Skip to content

Fix GetN to return the profile parameter in the linear material model - #132

Open
taeoukkim wants to merge 1 commit into
masterfrom
fix-linear-material-n
Open

taeoukkim wants to merge 1 commit into
masterfrom
fix-linear-material-n

Conversation

@taeoukkim

Copy link
Copy Markdown
Contributor

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 returns 0.0, overriding the stored viscous friction coefficient N. 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 coefficient N:

- double GetN(double S) const{return 0.0;};
+ double GetN(double S) const{return N;};

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.147092

Before the fix

The original LINEAR implementation produces an almost flat pressure distribution, while OLUFSEN agrees closely with the analytical solution.

[ image ]

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 N restores the expected viscous pressure drop for this steady, approximately rigid straight-tube case.

[image]

@taeoukkim
taeoukkim requested a review from ktbolt October 26, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant