Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current situation
Related problems with the linear material model were previously discussed in #108 and #110, but the zero-pressure-gradient behavior remains present in the current implementation. This PR follows up on those discussions with a focused fix and a before-and-after comparison against an analytical solution.
Currently,
cvOneDMaterialLinear::GetN()always returns0.0, overriding the stored viscous friction coefficientN. This suppresses the corresponding viscous friction contribution and produces an approximately zero pressure drop in the straight-tube test below, despite nonzero flow and viscosity.This PR changes
GetN()to return the stored coefficientN:Release Notes
Restore the viscous friction coefficient returned by the LINEAR material model.
Existing LINEAR simulations may produce different pressure drops because the coefficient was previously returned as zero.
Documentation
No input-format changes are required. The change and its verification are described below.
Testing
The implementation was checked using steady flow through a straight cylindrical vessel with high wall stiffness to approximate a rigid tube:
Vessel length: 10 cm
Reynolds number: approximately 200
Density: 1.06 g/cm³
Dynamic viscosity: 0.04 g/(cm·s)
Velocity-profile exponent: 2, corresponding to a parabolic profile
Outlet pressure: zero
The reference pressure drop is given by the Hagen–Poiseuille relation:
$$\Delta P = \frac{8\pi\mu LQ}{A^2}.$$
Model | Inlet–outlet pressure drop [mmHg] -- | -- Analytical solution | 1.147122 OLUFSEN | 1.147092 LINEAR before the fix | 0.000054 LINEAR after the fix | 1.147092Before the fix
The original LINEAR implementation produces an almost flat pressure distribution, while OLUFSEN agrees closely with the analytical solution.
[
]
After the fix
The corrected LINEAR implementation recovers the expected axial pressure gradient and agrees with OLUFSEN to the reported precision. Its inlet–outlet pressure drop differs from the analytical value by approximately 0.0026%.
This comparison verifies that returning
Nrestores the expected viscous pressure drop for this steady, approximately rigid straight-tube case.[
]