modelPartialVolumeN
Extends from ThermofluidStream.Utilities.DropOfCommonsPlus (Extend this to use 'dropOfCommons', 'instanceName', 'displayInstanceName' and 'displayParameters').
Information
This is the partial parent class for unidirectional volumes with N inlets. It is partial and missing the number if inputs, as well as a equations for its volume or medium pressure and one for the volume change work performed.
Conceptually a volume is a sink and a source. It therefore defines the level of inertial pressure r in a closed loop and acts as a loop breaker.
Volumes implement a damping term on the change of the stored mass to dampen out fast, otherwise undamped oscillations that appear when connecting volumes directly to other volumes or other boundaries (source, sink, boundary_fore, boundary_rear). With the damping term these oscillations will be still very fast, but dampened out, so a stiff solver might be able to handle them well. Damping is enabled by default and can be disabled by setting Advanced.k_volume_damping=0.
Due to stability reasons, mass-flows in the wrong direction (fluid entering the outlet or exiting the inlet) is considered to have the enthalpy and mass-fractions of the medium in the volume. This results in a stable steady-state solution, since this method effectiveley removes the parts of the energy and mass-fraction differential equations, that are associated with mass-flows.
Per default the Volume has the two states energy and mass (U_med and M) and one state for each mass, as well as one state for each substance of the fluid (except the first one). These will be enforced to be states of the simulation, which can result in nonlinear systems of size one or two, but works very reliable. To get rid of these systems the modeler can enable the flag 'usePreferredMediumStates' in the 'Advanced' tab. Then the volume uses the states preferred by the medium object, rather then the default ones, which can improve the nonlinear systems most of the time, but also might lead to larger nonlinear systems (e.g. in the Test 'VolumesDirectCoupling').
considerInertance
The parameter considerInertance is currently not included in the model; see
Idealized.UsersGuide.InertanceNeglect.
enableFreeInlet
The parameter enableFreeInlet is currently not included in the model; see
PartialVolume.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| String | instanceName (from DropOfCommonsPlus) | getInstanceName() | Instance name |
| Integer | N | 1 | Number of inlets |
| Boolean | useHeatport | false | = true, if heatPort is enabled |
| SI.Area | A | 1 | Heat transfer area |
| SI.CoefficientOfHeatTransfer | U | 200 | Thermal transmittance |
| Layout | |||
| Boolean | displayInstanceName (from DropOfCommonsPlus) | dropOfCommons.displayInstanceNames | = true, if instance name is displayed |
| Boolean | displayParameters (from DropOfCommonsPlus) | dropOfCommons.displayParameters | = true, if displaying parameters is enabled |
| Initialization › Pressure | |||
| Boolean | initialize_pressure | true | =true, if pressure is initialized |
| Medium.AbsolutePressure | p_start | Medium.p_default | Initial pressure set value |
| Initialization › Temperature | |||
| Boolean | initialize_energy | true | = true, if internal energy is initialized |
| Medium.Temperature | T_start | Medium.T_default | Initial Temperature set value |
| Initialization › Mass fractions | |||
| Boolean | initialize_Xi | true | =true, if mass fractions are iinitialized |
| Medium.MassFraction[Medium.nXi] | Xi_0 | Medium.X_default[1:Medium.nXi] | Initial mass fractions set values |
| Initialization › Specific enthalpy | |||
| Boolean | use_hstart | false | =true, if internal energy is initialized with specific enthalpy |
| Medium.SpecificEnthalpy | h_start | Medium.h_default | Initial specific enthalpy set value |
| Advanced | |||
| Utilities.Units.Inertance | L | dropOfCommons.L | Inertance of inlet/outlet |
| SI.MassFlowRate | m_flow_assert | -dropOfCommons.m_flow_reg | Assertion threshold for negative massflow |
| Boolean | usePreferredMediumStates | false | =true, if preferred medium states are used |
| Advanced › Damping | |||
| Real | k_volume_damping | dropOfCommons.k_volume_damping | Damping factor multiplicator |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Interfaces.Inlet[N] | inlet | ||
| Interfaces.Outlet | outlet | ||
| Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a | heatPort |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Medium.BaseProperties | medium | ||
| SI.Volume | V | Volume | |
| SI.Mass | M | V*medium.d | Mass |
| SI.Mass[Medium.nXi] | MXi | M*medium.Xi | Masses of species |
| SI.Energy | U_med | M*medium.u | Internal energy |
| SI.HeatFlowRate | Q_flow | Heat flow rate | |
| SI.Power | W_v | Work due to change of volume |
Contents
| Name | Description |
|---|---|
| Medium model |