Physiolibrary.SteadyStates.Components

Information

Extends from Modelica.Icons.Package (Icon for standard packages).

Package Content

Name Description
Physiolibrary.SteadyStates.Components.EnergyConservationLaw EnergyConservationLaw System Energy conservation law
Physiolibrary.SteadyStates.Components.MassConservationLaw MassConservationLaw System Mass (incompresible volume) conservation law
Physiolibrary.SteadyStates.Components.MolarConservationLaw MolarConservationLaw System Amount of substance (=number of molecules) conservation law
Physiolibrary.SteadyStates.Components.ElectricChargeConservationLaw ElectricChargeConservationLaw System amount of electric charge (=number of elementary charges) conservation law
Physiolibrary.SteadyStates.Components.ElementaryChargeConservationLaw ElementaryChargeConservationLaw System amount of electric charge (=number of elementary charges) conservation law

Physiolibrary.SteadyStates.Components.EnergyConservationLaw Physiolibrary.SteadyStates.Components.EnergyConservationLaw

System Energy conservation law

Physiolibrary.SteadyStates.Components.EnergyConservationLaw

Information

Extends from Interfaces.SteadyStateSystem (Global abstract class, for additional global state equations), Icons.ConservationLaw.

Parameters

TypeNameDefaultDescription
Integern Number of mass/energy fragments
EnergyTotal1Total mass/energy if useTotalAsInput=false [J]
External inputs/outputs
BooleanuseTotalInputfalse=true, if total mass/energy is used as an input
Simulation
Simulation type
SimulationTypeSimulation Dynamic with Initialization or Steady State
Equilibrium
IntegerNumberOfDependentStates1Number of additional steady state equation of the system

Connectors

TypeNameDescription
input EnergyInputfragment[n]Mass/Energy fragment [J]
input EnergyInputtotal[J]

Modelica definition

model EnergyConservationLaw "System Energy conservation law" extends Interfaces.SteadyStateSystem; //(Simulation=Types.SimulationType.SteadyState); extends Icons.ConservationLaw; parameter Integer n "Number of mass/energy fragments"; Types.RealIO.EnergyInput fragment[n] "Mass/Energy fragment"; parameter Boolean useTotalInput = false "=true, if total mass/energy is used as an input"; parameter Types.Energy Total = 1 "Total mass/energy if useTotalAsInput=false"; Types.RealIO.EnergyInput total(start=Total) = t if useTotalInput; Types.Energy t "Current Mass/Energy"; equation if not useTotalInput then t=Total; end if; t*normalizedState[1] = sum(fragment); //fragment[1] = homotopy( actual=Total*normalizedState[1] - sum(fragment[i] for i in 2:n), simplified=Total*normalizedState[1]*firstFragmentFraction); end EnergyConservationLaw;

Physiolibrary.SteadyStates.Components.MassConservationLaw Physiolibrary.SteadyStates.Components.MassConservationLaw

System Mass (incompresible volume) conservation law

Physiolibrary.SteadyStates.Components.MassConservationLaw

Information

Extends from Interfaces.SteadyStateSystem (Global abstract class, for additional global state equations), Icons.ConservationLaw.

Parameters

TypeNameDefaultDescription
Integern Number of mass/energy fragments
VolumeTotal1Total mass/energy if useTotalAsInput=false [m3]
External inputs/outputs
BooleanuseTotalInputfalse=true, if total mass/energy is used as an input
Simulation
Simulation type
SimulationTypeSimulation Dynamic with Initialization or Steady State
Equilibrium
IntegerNumberOfDependentStates1Number of additional steady state equation of the system

Connectors

TypeNameDescription
input VolumeInputfragment[n]Mass/Energy fragment [m3]
input VolumeInputtotal[m3]

Modelica definition

model MassConservationLaw "System Mass (incompresible volume) conservation law" extends Interfaces.SteadyStateSystem; //(Simulation=Types.SimulationType.SteadyState); extends Icons.ConservationLaw; parameter Integer n "Number of mass/energy fragments"; Types.RealIO.VolumeInput fragment[n] "Mass/Energy fragment"; parameter Boolean useTotalInput = false "=true, if total mass/energy is used as an input"; parameter Types.Volume Total = 1 "Total mass/energy if useTotalAsInput=false"; Types.RealIO.VolumeInput total(start=Total) = t if useTotalInput; Types.Volume t "Current Mass/Energy"; equation if not useTotalInput then t=Total; end if; t*normalizedState[1] = sum(abs(fragment)); //fragment[1] = homotopy( actual=Total*normalizedState[1] - sum(fragment[i] for i in 2:n), simplified=Total*normalizedState[1]*firstFragmentFraction); end MassConservationLaw;

Physiolibrary.SteadyStates.Components.MolarConservationLaw Physiolibrary.SteadyStates.Components.MolarConservationLaw

System Amount of substance (=number of molecules) conservation law

Physiolibrary.SteadyStates.Components.MolarConservationLaw

Information

Extends from Interfaces.SteadyStateSystem (Global abstract class, for additional global state equations), Icons.ConservationLaw.

Parameters

TypeNameDefaultDescription
Integern Number of mass/energy fragments
AmountOfSubstanceTotal1Total mass/energy if useTotalAsInput=false [mol]
External inputs/outputs
BooleanuseTotalInputfalse=true, if total mass/energy is used as an input
Simulation
Simulation type
SimulationTypeSimulation Dynamic with Initialization or Steady State
Equilibrium
IntegerNumberOfDependentStates1Number of additional steady state equation of the system

Connectors

TypeNameDescription
input AmountOfSubstanceInputfragment[n]Mass/Energy fragment [mol]
input AmountOfSubstanceInputtotal[mol]
output AmountOfSubstanceOutputtotalAmountOfSubstance[mol]

Modelica definition

model MolarConservationLaw "System Amount of substance (=number of molecules) conservation law" extends Interfaces.SteadyStateSystem; //(Simulation=Types.SimulationType.SteadyState); extends Icons.ConservationLaw; parameter Integer n "Number of mass/energy fragments"; Types.RealIO.AmountOfSubstanceInput fragment[n] "Mass/Energy fragment"; parameter Boolean useTotalInput = false "=true, if total mass/energy is used as an input"; parameter Types.AmountOfSubstance Total = 1 "Total mass/energy if useTotalAsInput=false"; Types.RealIO.AmountOfSubstanceInput total(start=Total) = t if useTotalInput; Types.AmountOfSubstance t "Current Mass/Energy"; Types.RealIO.AmountOfSubstanceOutput totalAmountOfSubstance; equation if not useTotalInput then t=Total; end if; t*normalizedState[1] = sum(abs(fragment)); //fragment[1] = homotopy( actual=Total*normalizedState[1] - sum(fragment[i] for i in 2:n), simplified=Total*normalizedState[1]*firstFragmentFraction); totalAmountOfSubstance = t; end MolarConservationLaw;

Physiolibrary.SteadyStates.Components.ElectricChargeConservationLaw Physiolibrary.SteadyStates.Components.ElectricChargeConservationLaw

System amount of electric charge (=number of elementary charges) conservation law

Physiolibrary.SteadyStates.Components.ElectricChargeConservationLaw

Information

Extends from Interfaces.SteadyStateSystem (Global abstract class, for additional global state equations), Icons.ConservationLaw.

Parameters

TypeNameDefaultDescription
Integern Number of mass/energy fragments
ElectricChargeTotal1Total mass/energy if useTotalAsInput=false [C]
External inputs/outputs
BooleanuseTotalInputfalse=true, if total mass/energy is used as an input
Simulation
Simulation type
SimulationTypeSimulation Dynamic with Initialization or Steady State
Equilibrium
IntegerNumberOfDependentStates1Number of additional steady state equation of the system

Connectors

TypeNameDescription
input ElectricChargeInputfragment[n]Mass/Energy fragment [C]
input ElectricChargeInputtotal[C]

Modelica definition

model ElectricChargeConservationLaw "System amount of electric charge (=number of elementary charges) conservation law" extends Interfaces.SteadyStateSystem; //(Simulation=Types.SimulationType.SteadyState); extends Icons.ConservationLaw; parameter Integer n "Number of mass/energy fragments"; Types.RealIO.ElectricChargeInput fragment[n] "Mass/Energy fragment"; parameter Boolean useTotalInput = false "=true, if total mass/energy is used as an input"; parameter Types.ElectricCharge Total = 1 "Total mass/energy if useTotalAsInput=false"; Types.RealIO.ElectricChargeInput total(start=Total) = t if useTotalInput; Types.ElectricCharge t "Current Mass/Energy"; equation if not useTotalInput then t=Total; end if; t*normalizedState[1] = sum(fragment); //fragment[1] = homotopy( actual=Total*normalizedState[1] - sum(fragment[i] for i in 2:n), simplified=Total*normalizedState[1]*firstFragmentFraction); end ElectricChargeConservationLaw;

Physiolibrary.SteadyStates.Components.ElementaryChargeConservationLaw Physiolibrary.SteadyStates.Components.ElementaryChargeConservationLaw

System amount of electric charge (=number of elementary charges) conservation law

Physiolibrary.SteadyStates.Components.ElementaryChargeConservationLaw

Information

Extends from SteadyStates.Interfaces.SteadyStateSystem (Global abstract class, for additional global state equations), Icons.ConservationLaw.

Parameters

TypeNameDefaultDescription
IntegerNumberOfParticles1Number of mass/energy fragments
IntegerCharges[NumberOfParticles]{1}Elementary charges of particles
ElectricChargeTotal1Total mass/energy if useTotalAsInput=false [C]
External inputs/outputs
BooleanuseTotalInputfalse=true, if total mass/energy is used as an input
Simulation
Simulation type
SimulationTypeSimulation Dynamic with Initialization or Steady State
Equilibrium
IntegerNumberOfDependentStates1Number of additional steady state equation of the system

Connectors

TypeNameDescription
input AmountOfSubstanceInputfragment[NumberOfParticles]Mass/Energy fragment [mol]
input ElectricChargeInputtotal[C]

Modelica definition

model ElementaryChargeConservationLaw "System amount of electric charge (=number of elementary charges) conservation law" extends SteadyStates.Interfaces.SteadyStateSystem; //(Simulation=Types.SimulationType.SteadyState); extends Icons.ConservationLaw; parameter Integer NumberOfParticles=1 "Number of mass/energy fragments"; parameter Integer Charges[NumberOfParticles] = {1} "Elementary charges of particles"; Types.RealIO.AmountOfSubstanceInput fragment[NumberOfParticles] "Mass/Energy fragment"; parameter Boolean useTotalInput = false "=true, if total mass/energy is used as an input"; parameter Types.ElectricCharge Total = 1 "Total mass/energy if useTotalAsInput=false"; Types.RealIO.ElectricChargeInput total(start=Total)=t if useTotalInput; Types.ElectricCharge t "Current Mass/Energy"; equation if not useTotalInput then t=Total; end if; //original meaning: t*normalizedState[1] = Modelica.Constants.F*Charges*abs(fragment); //elementary charge from Eq to C //hacked, but still the same: (because Dymola find steady state solution for specific problems in negative concentrations, when abs() not used) //t*normalizedState[1] = Modelica.Constants.F*(Charges[1]*(if noEvent(fragment[1]>=0) then fragment[1] else -fragment[1]) + sum(Charges[i]*fragment[i] for i in 2:NumberOfParticles)); end ElementaryChargeConservationLaw;

Automatically generated Tue Sep 15 22:54:24 2015.