modelVolumeVLE_L4_Advanced_WH_VCM
Copy of VolumeVLE_L4_Advanced with adaptation of speed of sound according and vapour cavity model
Extends from ClaRa.Basics.Icons.Volume_L4, ClaRa.Basics.Icons.ComplexityLevel (Displays the complexity level inside model icon ).
Information
For detailed model documentation please consult the html-documentation shipped with ClaRa.
Authorship and Copyright Statement for original (initial) Contribution
Author:
ClaRa development team, Copyright © 2017 - 2025.References:
For references please consult the html-documentation shipped with ClaRa.
Remarks:
This component was developed for ClaRa library.
Acknowledgements:
CLA:
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | Zeta_in | 0 | Inlet losses additional to wall friction |
| Real | Zeta_out | 0 | Outlet losses additional to wall friction |
| SI.DensityMassSpecific[geo.N_cv] | rho_nom | TILMedia.VLEFluid.Functions.density_phxi(medium, p_nom, h_nom) | Nominal density |
| SI.Temperature[geo.N_cv] | T_start | TILMedia.VLEFluid.Functions.temperature_phxi(medium, p_start, h_start) | Nominal Temperature |
| Real | suppFreqCorr | if suppressHighFrequencyOscillations then suppHighFreqCorr else 0 | |
| ClaRa.Basics.Units.Time | Tau_T_ps | 1e-4 | Time constant for pseudo state for temperature. |
| Real | exportToFMUPreFactor | if exportToFMU then 1.0 else 0.0 | |
| Real | useStiffWallPreFactor | if useStiffWall then 1.0 else 0.0 | |
| Real | userDefinedSpeedOfSoundPreFactor | if userDefinedSpeedOfSound then 1.0 else 0.0 | |
| Fundamental Definitions | |||
| TILMedia.VLEFluid.Types.BaseVLEFluid | medium | simCenter.fluid1 | Medium in the component |
| Boolean | frictionAtInlet | false | True if pressure loss shall be located between first cell and inlet |
| Boolean | frictionAtOutlet | false | True if pressure loss shall be located between last cell and outlet |
| Nominal Values | |||
| SI.Pressure[geo.N_cv] | p_nom | ones(geo.N_cv)*1e5 | Nominal pressure |
| SI.EnthalpyMassSpecific[geo.N_cv] | h_nom | ones(geo.N_cv)*1e5 | Nominal specific enthalpy for single tube |
| SI.MassFlowRate | m_flow_nom | 100 | Nominal mass flow for single tube |
| SI.Pressure | Delta_p_nom | 1e4 | Nominal pressure loss w.r.t. all parallel tubes |
| Initialisation | |||
| Integer | initOption | 1 | Type of initialisation |
| SI.EnthalpyMassSpecific[geo.N_cv] | h_start | ones(geo.N_cv)*800e3 | Initial specific enthalpy for single tube |
| SI.Pressure[geo.N_cv] | p_start | ones(geo.N_cv)*1e5 | Initial pressure |
| SI.MassFlowRate[geo.N_cv + 1] | m_flow_start | ones(geo.N_cv + 1)*100 | Initial mass flow rate |
| SI.MassFraction[medium.nc - 1] | xi_start | zeros(medium.nc - 1) | Initial composition |
| Initialisation › Model Settings | |||
| Boolean | useHomotopy | simCenter.useHomotopy | True, if homotopy method is used during initialisation |
| Summary and Visualisation | |||
| Boolean | showExpertSummary | simCenter.showExpertSummary | True, if a summary shall be shown, else false |
| Boolean | showData | false | True, if a data port containing p,T,h,s,m_flow shall be shown, else false |
| Expert Settings | |||
| Boolean | suppressHighFrequencyOscillations | false | Suppress oscillations at frequencies greater than inverse travelling time of sound |
| Real | suppHighFreqCorr | 1 | Damping factor. Increase it will increase damping |
| Real | pressureAdvCalc | 0 | Parameter for a method of calculation advective pressure drop using:|| 0:= upstream velocities | 1:= velocities in energy cells |
| Expert Settings › Mass Flow Stabilization | |||
| Boolean | useMeanEnthalpyAtInlet | false | Use mean enthalpy at inlet, stabilises zero flows |
| Boolean | useMeanEnthalpyAtOutlet | false | Use mean enthalpy at inlet, stabilises zero flows |
| Boolean | advectivePressureLoss | true | |
| Boolean | limitMassChange | false | Set to true to limit time derivative of control volume mass. CAUTION: Precise short time dynamics is artificially changed! Can be useful if simulation stops in case of phase change. |
| Real | massChangeLimit | 10 | Limit abs(drhodt[I]/rho[I])=abs(der(mass[I])/mass[I])<= massChangeLimit |
| Water Hammer › FMU export | |||
| Boolean | exportToFMU | false | True if user defined media data shall not change structure | false else |
| Water Hammer › User Defined Physical Properties | |||
| Boolean | useStiffWall | true | True for stiff walls | False to account for elasticity of wall material |
| Boolean | userDefinedSpeedOfSound | false | True for user definition of speed of sound |
| SI.ElasticityModule | E | 120e9 | Young's modulus |
| Real | my | 0.34 | Possion's ratio |
| SI.Length | e | 0.00163 | Wall thickness |
| SI.Velocity | a_def | 1319 | User defined speed of sound |
| Boolean | userDefinedDynamicViscosity | false | True for user definition of speed of sound |
| SI.DynamicViscosity[geo.N_cv + 1] | eta_FM_def | ones(geo.N_cv + 1)*1e-3 | User defined dynamic viscosity |
| Boolean | useUnsteadyFriction | true | True for Unsteady Friction |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| ClaRa.Basics.Interfaces.FluidPortIn | inlet | Inlet port | |
| ClaRa.Basics.Interfaces.FluidPortOut | outlet | Outlet port | |
| ClaRa.Basics.Interfaces.HeatPort_a[geo.N_cv] | heat |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| String | complexity (from ComplexityLevel) | "??" | |
| ClaRa.SimCenter | simCenter | ||
| Summary | summary | ||
| SI.EnthalpyMassSpecific[geo.N_cv] | h | Cell enthalpy | |
| SI.EnthalpyMassSpecific | h_in | ||
| SI.EnthalpyMassSpecific | h_out | ||
| SI.Temperature[geo.N_cv] | T_ps | Temperature pseudo state | |
| SI.Mass[geo.N_cv] | mass | Mass of fluid in cells | |
| Real[geo.N_cv] | drhodt | ||
| Modelica.Units.SI.MassFraction[geo.N_cv,medium.nc - 1] | xi | Mass fraction | |
| Real | Xi_flow | Mass flow rate of fraction | |
| Modelica.Units.SI.MassFraction[medium.nc - 1] | xi_inlet | Inlet mass fraction of component | |
| Modelica.Units.SI.MassFraction[medium.nc - 1] | xi_outlet | Outlet mass fraction of component | |
| SI.Power[geo.N_cv + 1] | H_flow | Enthalpy flow rate at cell borders | |
| SI.MassFlowRate[geo.N_cv + 1] | m_flow | ||
| SI.Velocity[geo.N_cv] | w | flow velocities within cells of energy model == flow velocities across cell borders of flow model | |
| SI.Velocity | w_inlet | flow velocity at inlet | |
| SI.Velocity | w_outlet | flow velocity at outlet | |
| SI.Velocity[geo.N_cv + 1] | w_FM | flow velocities within cells of flow model == flow velocities across cell borders of energy model | |
| SI.Velocity[geo.N_cv] | w_up | upstream flow velocities for calculation of advective pressure losses | |
| SI.Pressure[geo.N_cv] | p_sat | Saturation pressure | |
| SI.Volume[geo.N_cv] | volume | Variable volume of CV | |
| SI.Volume[2] | volume_cavity | Volume of cavity in first an last CV | |
| SI.Volume[2] | volume_cavity_help | Volume of cavity in first and last CV | |
| Real[geo.N_cv] | K | Bulk modulus | |
| Real | K_inlet | Inlet bulk modulus | |
| Real | K_outlet | Inlet bulk modulus | |
| SI.PressureDifference[geo.N_cv + 1] | Delta_p_u | Pressure loss due to unsteady friction | |
| Real[geo.N_cv + 1] | Re | Reynolds Number | |
| Real[geo.N_cv + 1] | k_B | Brunone friction factor | |
| TILMedia.VLEFluid.MixtureCompatible.VLEFluid_ph[geo.N_cv] | fluid | ||
| TILMedia.VLEFluid.MixtureCompatible.VLEFluid_ph | fluidInlet | if useHomotopy then homotopy(inStream(inlet.h_outflow), h_in) else h_in | |
| TILMedia.VLEFluid.MixtureCompatible.VLEFluid_ph | fluidOutlet | (outlet.h_outflow + inStream(outlet.h_outflow))/2 | |
| PressureLoss | pressureLoss | Pressure loss model | |
| HeatTransfer | heatTransfer | heat transfer model | |
| MechanicalEquilibrium | mechanicalEquilibrium | Mechanical equilibrium model | |
| Geometry | geo |
Contents
| Name | Description |
|---|---|
Revisions
For revisions please consult the html-documentation shipped with ClaRa.