You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original creation date: 2024-05-21T19:58:58.596Z
Original update date: 2025-07-28T09:54:50.206Z
In the volumes (and derived components) dynamic_mass_bamancecan be set to:
false → BQ=0: inflows equal outflows.
true → BQ=V*der(rho) : the inflow/outflow inbalance compensate compression/dilation.
In ThermoSysPro the der(rho) term is generally decomposed in the ddph*der(P) (isenthalpic) and ddhp*der(h) (isobaric) terms.
I'am wondering whether an intermediate choice to take into account only the isobaric term, aka the thermal dilatation, would be a good enhancement for the library. I think this would make sense at least for liquid water for a couple of reasons:
Liquid water is generally considered as incompressible (ddph~0).
Variations of h travel slowly (transported by the mass flow) compared to Pvariations: it should be easier to solve the isobaric term only than the whole equation.
This could be useful for example to model the thermal dilatation in the primary circuit of a PWR ( @viola.ferrara).
We have some discussion today with users of the ThermoPower library (Polimi).
They have the same decomposition of the density derivative in the two terms; however, ddph is set to zero if the flow is monophasic.
@viola.ferrara should test something on this issue (e.g. simplified_mass_balance=true) in the next days.
Oscillations (and many many events) are also (and mainly) presents without inertia (tested with a SingularPressureLoss instead of LumpedStraightPipe).
With inertia, I had some wrong setup yesterday, leading to big oscillations, but which were more related to the Pressure difference between the Tank and the Volume. Tying to free the P0 in the volume while imposing the Q=0 allows for far lower oscillations that does not slow down the simulation. So maybe this is not a sufficient test case... I will retry the TANDEM-SMR-NSSS case to see if it work properly...
By the way, maybe, too long pipes lead to to strong inertia: potentially a more meshed approach would better describe the real phenomena... 🤔
I am not sure of the der(P)=0 approach... maybe we should discuss of it.
addition of pressure losses with k=1 around the upper plenum, to add some dissipation {width=309 height=167}
RESULT: active fluid dilation, still oscillations in mass flow, however the outlet of upper plenum becomes stable, simulation does not fail
MASS FLOW GRAPH IN UPPER PLENUM:
{width=446 height=338}
Adding the pressure losses solves the chaotic flow variations at upper plenum outlet, but it does not solve the more "stable" oscillation of mass flow in the circuit.
So, the main issue "no dilatation or chaotic flow to pressurizer" is quite resolved with "appropriate pressure losses". However, it still is quite strange that we have such oscillations in the main circuit. It would also be interesting to run longer simulations: the oscillations seem to increase in amplitude, maybe to an asymptote? Will they diverge, stabilize or disappear?
For this example, if I am not mistaken, the oscillations are stable, they don't diverge even for long simulation times. They just reamin with their oscillation pattern.
Ah, I think I read too quickly your previous post: we still have oscillations in the expansion leg and they are probably responsible for the oscillations of mass flow in the whole circuit.
Concerning your thoughts on h and h_vol, I agree that the enthalpy is indeed quite different between the pressurizer and the loop, so this could be the right direction to go.
Maybe just trying to mesh the extension leg. Or trying something else also in relationship with #152 (formerly GL#76).
Activity
modelibot commentedon Oct 12, 2026
Comment by SIMONINI Giorgio (@giorgio.simonini) (GitHub: @Sonyoyo) on 2024-05-30T13:26:20.786Z:
We have some discussion today with users of the ThermoPower library (Polimi).
They have the same decomposition of the density derivative in the two terms; however,
ddphis set to zero if the flow is monophasic.@viola.ferrara should test something on this issue (e.g.
simplified_mass_balance=true) in the next days.modelibot commentedon Oct 12, 2026
Comment by VESCOVI Guilherme (@guilherme.vescovi) (GitHub: @guivesc) on 2025-06-26T12:43:01.971Z:
Test model:
Simulation : Oscilations that may slow down simulation.
Oscilations only occur when pipe inertia = trueModified volume option 1 :$\left.\frac{\partial\rho}{\partial P}\right|_{h=const}=0$
Simulation : Simulation stops very early
Modified volume option 2 :$\frac{dP}{dt}=0$
Removed initial condition P=P0:
Simulation : Oscilations disapear for massflow and are reduced for pressure
modelibot commentedon Oct 12, 2026
Comment by SIMONINI Giorgio (@giorgio.simonini) (GitHub: @Sonyoyo) on 2025-06-26T14:12:28.844Z:
I tried to make some tests on my side:
SingularPressureLossinstead ofLumpedStraightPipe).P0in the volume while imposing theQ=0allows for far lower oscillations that does not slow down the simulation. So maybe this is not a sufficient test case... I will retry the TANDEM-SMR-NSSS case to see if it work properly...der(P)=0approach... maybe we should discuss of it.modelibot commentedon Oct 12, 2026
Comment by VESCOVI Guilherme (@guilherme.vescovi) (GitHub: @guivesc) on 2025-07-10T09:18:25.754Z:
Test: adding pressure losses to dissipate kinetic energy
Config:
NSSS:
NSSS_Dilation: NSSS_Dilation.mo
NSSS_Dilation_pdc: NSSS_Dilation_pdc.mo
MASS FLOW GRAPH IN UPPER PLENUM:
Adding the pressure losses solves the chaotic flow variations at upper plenum outlet, but it does not solve the more "stable" oscillation of mass flow in the circuit.
modelibot commentedon Oct 12, 2026
Comment by SIMONINI Giorgio (@giorgio.simonini) (GitHub: @Sonyoyo) on 2025-07-25T12:52:41.466Z:
Nice tests, thanks.
So, the main issue "no dilatation or chaotic flow to pressurizer" is quite resolved with "appropriate pressure losses". However, it still is quite strange that we have such oscillations in the main circuit. It would also be interesting to run longer simulations: the oscillations seem to increase in amplitude, maybe to an asymptote? Will they diverge, stabilize or disappear?
modelibot commentedon Oct 12, 2026
Comment by VESCOVI Guilherme (@guilherme.vescovi) (GitHub: @guivesc) on 2025-07-25T13:01:59.114Z:
For this example, if I am not mistaken, the oscillations are stable, they don't diverge even for long simulation times. They just reamin with their oscillation pattern.
modelibot commentedon Oct 12, 2026
Comment by VESCOVI Guilherme (@guilherme.vescovi) (GitHub: @guivesc) on 2025-07-25T13:09:32.115Z:
I think these oscillations are also related to the difference in h and h_vol : with flow inversions, the condition :
changes between true and false, which causes the enthalpy to oscillate. If we replace the previous condition by :
The mass flow converges to a constant value... Maybe this is just a consequence of the problem, but something to think about...
modelibot commentedon Oct 12, 2026
Comment by SIMONINI Giorgio (@giorgio.simonini) (GitHub: @Sonyoyo) on 2025-07-28T09:54:50.132Z:
Ah, I think I read too quickly your previous post: we still have oscillations in the expansion leg and they are probably responsible for the oscillations of mass flow in the whole circuit.
Concerning your thoughts on
handh_vol, I agree that the enthalpy is indeed quite different between the pressurizer and the loop, so this could be the right direction to go.Maybe just trying to mesh the extension leg. Or trying something else also in relationship with #152 (formerly GL#76).