modelTestWaterFlow1DFEMnm_D
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 the test compressibility effects. The operating fluid is superheated vapour; the heat flow entering the heat exchanger is set to zero.
During simulation mass flow rate changes:
- t=2 s, Step variation of the inlet mass flow rate. The pressure increases with a first order dynamics, the tube actually behaving like a pressurized tank.
Simulation Interval = [0...2] sec
Integration Algorithm = DASSL
Algorithm Tolerance = 1e-6
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | Nnodes | 12 | |
| 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 | |
| Real | Cfhex | 0.005 | |
| Modelica.Units.SI.MassFlowRate | whex | 1e-2 | |
| Modelica.Units.SI.Pressure | phex | 0.2e5 | |
| Modelica.Units.SI.SpecificEnthalpy | hs | 3e6 |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| TestWaterFlow1DFEM_D | refData | ||
| FluidPh.Flow1DFEMnm | hex | ||
| FluidPh.SourceMassFlow | MassFlowRateSource | ||
| FluidPh.SinkPressure | FluidSink | ||
| FluidPh.ValveLin | ValveLin1 | ||
| Modelica.Blocks.Sources.Step | MassFlowRateStep | ||
| Modelica.Blocks.Sources.Constant | Constant1 | ||
| FluidPh.SensP | SensP | ||
| System | system | ||
| SI.Pressure | delta_p | (refData.hex.p - hex.p)/1e5 | |
| SI.SpecificEnthalpy | delta_h | (refData.hex.h - hex.h)/1e6 | |
| SI.TemperatureDifference | delta_T | (refData.hex.T - hex.T)/1e2 | |
| SI.MassFlowRate | delta_w | (refData.hex.w - hex.w)/0.01 | |
| 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.