modelTestWaterFlow1DFEMnm_J
Extends from Modelica.Icons.Example (Icon for runnable examples).
Information
The model is designed to test the coupling between the mass and energy balance equations in 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)
The pipe is connected to two pressure sources at the same pressure, with initial conditions corresponding to superheated steam @ 30 bar, 700 K.
At time t = 0, the two pressures start to increase, so that the fluid is compressed into the pipe. Since the configuration is symmetric, there is a forward flow in the left half of the pipe and a backward flow on the right half of the pipe. The parameter wout is an analytical estimate of the flow rate going out each end of the pipe, which is in a good agreement with the actual solution.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | Nnodes | 11 | |
| 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.05 | |
| Modelica.Units.SI.MassFlowRate | whex | 0.03 | |
| Modelica.Units.SI.Pressure | phex | 30e5 | |
| Modelica.Units.SI.Temperature | Thex | 700 | |
| Modelica.Units.SI.SpecificEnthalpy | hhex | Medium.specificEnthalpy_pT(phex, Thex) | |
| Modelica.Units.SI.Density | rhohex | Medium.density_pT(phex, Thex) | |
| Modelica.Units.SI.SpecificHeatCapacity | cv | Medium.specificHeatCapacityCv(Medium.setState_pT(phex, Thex)) |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| TestWaterFlow1DFEM_J | refData | ||
| FluidPh.SinkPressure | sink1 | ||
| FluidPh.Flow1DFEMnm | pipe1 | ||
| System | system | ||
| FluidPh.SourcePressure | source1 | ||
| Modelica.Blocks.Sources.Ramp | ramp | ||
| SI.Pressure | delta_p | (refData.pipe1.p - pipe1.p)/1e5 | |
| SI.SpecificEnthalpy | delta_h | (refData.pipe1.h - pipe1.h)/1e6 | |
| SI.TemperatureDifference | delta_T | (refData.pipe1.T - pipe1.T)/1e2 | |
| SI.MassFlowRate | delta_w | (refData.pipe1.w - pipe1.w)/0.1 | |
| SI.HeatFlux | delta_phi | (refData.pipe1.heatTransfer.phi_f - pipe1.phi)/1e4 |
Contents
| Name | Description |
|---|---|
Revisions
- 5 Jan 2026 by Andrea Giorgio Bartolini:
First release.