Package Modelica.​Fluid.​Examples.​AST_BatchPlant.​BaseClasses
Icon for packages containing base classes

Information

This icon shall be used for a package/library that contains base models and classes, respectively.

Extends from Modelica.​Icons.​BasesPackage (Icon for packages containing base classes).

Package Contents

NameDescription
Controller 
ControllerUtilities 
InitEnumeration to define initialization options
InnerTank 
setRealSet output signal to a time varying Real expression
TankWith3InletOutletArraysWithEvaporatorCondensorTank with Heating and Evaporation
TankWithTopPortsTank with inlet/outlet ports and with inlet ports at the top

Block Modelica.​Fluid.​Examples.​AST_BatchPlant.​BaseClasses.​setReal
Set output signal to a time varying Real expression

Information

Connectors

TypeNameDescription
input RealInputuSet value of Real input

Model Modelica.​Fluid.​Examples.​AST_BatchPlant.​BaseClasses.​TankWith3InletOutletArraysWithEvaporatorCondensor
Tank with Heating and Evaporation

Information

This tank has the same geometric variables as TankWith3InletOutletArrays plus the feature of a HeatPort and the possibility of evaporation. (Assumption: The gas is condensed immediately afterwards so that a liquid boiling fluid is created.)

The tank can be initialized with the following options:

Full steady state initialization is not supported, because the corresponding initial equations for temperature/enthalpy are undetermined (the flow rate through the port at steady state is zero).

Parameters

TypeNameDefaultDescription
AreacrossArea Tank area
Areatop_pipeArea[n_TopPorts] Area of outlet pipe
Areaside_pipeArea[n_SidePorts] Area of outlet pipe
Areabottom_pipeArea[n_BottomPorts] Area of outlet pipe
Heightheight10Height of Tank
VolumeV00Volume of the liquid when the level is zero
Realside_heights[n_SidePorts]zeros(n_SidePorts) 
Realbottom_heights[n_BottomPorts]zeros(n_BottomPorts) 
Realtop_heights[n_TopPorts]fill(height, n_TopPorts) 
Heightlevel_start Initial tank level
InitinitTypeInit.​GuessValuesInitialization option
Booleanuse_T_starttrueUse T_start if true, otherwise h_start
TemperatureT_startif use_T_start then 293.15 else Medium.temperature_phX(p_ambient, h_start, X_start)Start value of temperature
SpecificEnthalpyh_startif use_T_start then Medium.specificEnthalpy_pTX(p_ambient, T_start, X_start[1:Medium.nXi]) else 10000Start value of specific enthalpy
MassFractionX_start[Medium.nX]Medium.​reference_XStart value of mass fractions m_i/m
AbsolutePressurep_ambient101325Tank surface pressure
TemperatureT_ambient293.15Tank surface Temperature
Integern_TopPorts1number of Top connectors
Integern_SidePorts1number of side connectors
Integern_BottomPorts1number of bottom connectors
Realmin_level_for_heating  

Connectors

TypeNameDescription
FluidPort_bBottomFluidPort[n_BottomPorts] 
FluidPort_aTopFluidPort[n_TopPorts] 
FluidPort_bSideFluidPort[n_SidePorts] 
FluidPort_bCondensed 
HeatPort_aheatPort 

Model Modelica.​Fluid.​Examples.​AST_BatchPlant.​BaseClasses.​InnerTank

Inputs

TypeNameDefaultDescription
MassFractionXi[Medium.nXi] Actual mass fractions of fluid in tank

Connectors

TypeNameDescription
FluidPort_aport 

Model Modelica.​Fluid.​Examples.​AST_BatchPlant.​BaseClasses.​Controller

Parameters

TypeNameDefaultDescription
Realw_dilution0.003 
Realw_concentrate0.005 
RealstartTime1 
RealT5_batch_level0.211 

Connectors

TypeNameDescription
Port_Sensorssensors 
Port_Actuatorsactuators 

Enumeration Modelica.​Fluid.​Examples.​AST_BatchPlant.​BaseClasses.​Init
Enumeration to define initialization options

Information

Integer type that can have the following values (to be selected via choices menu):

Types.Init.Meaning
GuessValues GuessValues -- Guess values (not fixed) for p, T or h, X, C
InitialValues Initial values for p, T or h, X, C
SteadyStateMomentum Steady state momentum
SteadyStateHydraulic Hydraulic steady state (der(p)=0), guess value for p, initial values for T or h, X, C
SteadyState Steady state (guess values for p, T or h, X, C)

Literals

NameDescription
GuessValuesGuessValues -- Guess values (not fixed) for p, T or h, X, C
InitialValuesInitialValues -- Initial values for p, T or h, X, C
SteadyStateMomentumSteadyStateMomentum: Steady state momentum
SteadyStateHydraulicSteadyStateHydraulic -- Hydraulic steady state (der(p)=0), guess value for p, initial values for T or h, X, C
SteadyStateSteadyState -- Steady state (guess values for p, T or h, X, C)

Model Modelica.​Fluid.​Examples.​AST_BatchPlant.​BaseClasses.​TankWithTopPorts
Tank with inlet/outlet ports and with inlet ports at the top

Information

Model of a tank that is open to the environment at the fixed pressure p_ambient. The tank is filled with a single or multiple-substance liquid, assumed to have uniform temperature and mass fractions.

At the top of the tank over the maximal fill level height a vector of FluidPorts, called topPorts, is present. The assumption is made that fluid flows always in to the tank via these ports (and never back in to the connector).

The vector of connectors ports are fluid ports at the bottom and side of the tank at a definable height. Fluid can flow either out of or in to this port. The fluid level of the tank may be below one of these ports. This case is approximated by introducing a large pressure flow coefficient so that the mass flow rate through this port is very small in this case.

If the tank starts to over flow (i.e., level > height), an assertion is triggered.

When the diagram layer is open in the plot environment, the level of the tank is dynamically visualized. Note, the speed of the diagram animation in Dymola can be set via command animationSpeed(), e.g., animationSpeed(speed = 10)

Extends from Modelica.​Fluid.​Interfaces.​PartialLumpedVolume (Lumped volume with mass and energy balance).

Parameters

TypeNameDefaultDescription
Heightheight Maximum level of tank before it overflows
AreacrossArea Area of tank
VolumeV00Volume of the liquid when level = 0
AbsolutePressurep_ambientsystem.​p_ambientTank surface pressure
TemperatureT_ambientsystem.​T_ambientTank surface Temperature
Heightlevel_start0.5 * heightStart value of tank level
DynamicsenergyDynamicssystem.​energyDynamicsFormulation of energy balance
DynamicsmassDynamicssystem.​massDynamicsFormulation of mass balance
final DynamicssubstanceDynamicsmassDynamicsFormulation of substance balance
final DynamicstraceDynamicsmassDynamicsFormulation of trace substance balance
final AbsolutePressurep_startp_ambientStart value of pressure
Booleanuse_T_starttrue= true, use T_start, otherwise h_start
TemperatureT_startif use_T_start then system.T_start else Medium.temperature_phX(p_start, h_start, X_start)Start value of temperature
SpecificEnthalpyh_startif use_T_start then Medium.specificEnthalpy_pTX(p_start, T_start, X_start) else Medium.h_defaultStart value of specific enthalpy
MassFractionX_start[Medium.nX]Medium.​X_defaultStart value of mass fractions m_i/m
ExtraPropertyC_start[Medium.nC]Medium.​C_defaultStart value of trace substances
IntegernTopPorts0Number of inlet ports above height (>= 1)
IntegernPorts0Number of inlet/outlet ports (on bottom and on the side)
VesselPortsDataportsData[nPorts] Data of inlet/outlet ports at side and bottom of tank
Booleanuse_HeatTransferfalse= true to use the HeatTransfer model
RealhysteresisFactor0.1Hysteresis for empty pipe = diameter*hysteresisFactor
BooleanstiffCharacteristicForEmptyPortfalse=true, if steep pressure loss characteristic for empty pipe port
RealzetaLarge100000Large pressure loss factor if mass flows out of empty pipe port
MassFlowRatem_flow_smallsystem.​m_flow_smallRegularization range at zero mass flow rate

Connectors

TypeNameDescription
VesselFluidPorts_atopPorts[nTopPorts]Inlet ports over height at top of tank (fluid flows only from the port in to the tank)
VesselFluidPorts_bports[nPorts]inlet/outlet ports at bottom or side of tank (fluid flows in to or out of port; a port might be above the fluid level)
HeatPort_aheatPort