modelTestWaterFlow1DFEMnm_C
Test case for Flow1Dfem
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
The model is designed to test the component Flow1DFEMnm vs the reference model Flow1DFEM (fluid side of a heat exchanger, finite element method).
The following relative errors can be used to check the results vs the reference model:
- delta_p (pressure)
- delta_h (specific enthalpy profile)
- delta_T (semperature profile)
- delta_w (mass flowrate profile)
- delta_phi (heat flux profile)
This model is designed to simulate the flow reversal througth the heat exchanger. The operating fluid is liquid water; the heat flux entering the heat exchanger is set to zero.
During the simulation, flow reversal is achieved:
- t=500 s, Negative ramp variation (duration = 20 s) of the mass flow rate trough the heat exchanger. The final mass flow rate has the same magnitude and opposite direction with respect to the initial one.
Simulation Interval = [0...1000] sec
Integration Algorithm = DASSL
Algorithm Tolerance = 1e-6
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | Nnodes | 12 | |
| Modelica.Units.SI.Length | Lhex | 200 | |
| Modelica.Units.SI.Diameter | Dihex | 0.02 | |
| Modelica.Units.SI.Radius | rhex | Dihex/2 | |
| Modelica.Units.SI.Length | omegahex | Modelica.Constants.pi*Dihex | |
| Modelica.Units.SI.Area | Ahex | Modelica.Constants.pi*rhex^2 | |
| Real | Cfhex | 0.005 | |
| Modelica.Units.SI.MassFlowRate | whex | 0.3 | |
| Modelica.Units.SI.Pressure | phex | 1e5 | |
| Modelica.Units.SI.SpecificEnthalpy | hs | 1e5 |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| TestWaterFlow1DFEM_C | refData | ||
| FluidPh.Flow1DFEMnm | hex | ||
| FluidPh.ValveLin | ValveLin1 | ||
| FluidPh.SinkPressure | SinkP1 | ||
| FluidPh.SourceMassFlow | SourceW1 | ||
| Modelica.Blocks.Sources.Ramp | Ramp1 | ||
| Modelica.Blocks.Sources.Constant | Constant1 | ||
| FluidPh.SensT | T_in | ||
| FluidPh.SensT | T_out | ||
| System | system | ||
| SI.Pressure | delta_p | (refData.hex.p - hex.p)/1e5 | |
| SI.SpecificEnthalpy | delta_h | (refData.hex.h - hex.h)/1e5 | |
| SI.TemperatureDifference | delta_T | (refData.hex.T - hex.T)/1e2 | |
| SI.MassFlowRate | delta_w | (refData.hex.w - hex.w)/0.1 | |
| SI.HeatFlux | delta_phi | (refData.hex.heatTransfer.phi_f - hex.phi)/1e4 |
Contents
| Name | Description |
|---|---|
Revisions
- 5 Jan 2026 by Andrea Giorgio Bartolini:
First release.