modelTestWaterFlow1DFEMnm_G
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) under reversing and zero flow conditions.
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)
The simulation starts with cold fluid in the pipe and with positive flow from the hot source on the left. Around t = 20, the flow is reversed, and cold fluid enters the pipe from the cold source on the right. Around t = 40, the flow is brought to zero and stays there.
Simulation Interval = [0...50] sec
Integration Algorithm = DASSL
Algorithm Tolerance = 1e-6
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | Nnodes | 6 | |
| Modelica.Units.SI.Length | Lhex | 10 | |
| 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 | |
| Modelica.Units.SI.PerUnit | Cfhex | 0.005 | |
| Modelica.Units.SI.MassFlowRate | whex | 0.3 | |
| Modelica.Units.SI.Pressure | phex | 2e5 | |
| Modelica.Units.SI.SpecificEnthalpy | hinhex | 1e5 | |
| Modelica.Units.SI.SpecificEnthalpy | houthex | 1e5 | |
| Modelica.Units.SI.SpecificEnthalpy | deltah | 41800 | |
| Modelica.Units.SI.EnergyFlowRate | W | 41800*whex |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| TestWaterFlow1DFEM_G | refData | ||
| FluidPh.SourceMassFlow | Fluid_Source | ||
| FluidPh.SinkPressure | Fluid_Sink | ||
| FluidPh.Flow1DFEMnm | hex | ||
| FluidPh.SensT | T_in | ||
| Modelica.Blocks.Sources.TimeTable | MassFlowRate | ||
| 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.