diff --git a/Chemical/Boundaries.mo b/Chemical/Boundaries.mo index 8d7e104..6a4e0d9 100644 --- a/Chemical/Boundaries.mo +++ b/Chemical/Boundaries.mo @@ -467,985 +467,6 @@ extends Modelica.Icons.SourcesPackage; ")); end SourceSink; - model Volumes "Test Volumes" - extends Modelica.Icons.Example; - - replaceable package Medium = ThermofluidStream.Media.myMedia.Air.SimpleAir constrainedby ThermofluidStream.Media.myMedia.Interfaces.PartialMedium - "Medium package" annotation (Documentation(info=" -

-Medium package used in the Test. -

-")); - - package MediumMix = ThermofluidStream.Media.myMedia.IdealGases.MixtureGases.CombustionAir - "Medium package" - annotation (Documentation(info=" -

-Medium package used in the Test of the MixVolumes. -

-")); - - inner ThermofluidStream.DropOfCommons dropOfCommons(assertionLevel=AssertionLevel.warning) - annotation (Placement(transformation(extent={{70,-170},{90,-150}}))); - Source source(redeclare package Medium = Medium, - p0_par=200000, - outlet(m_flow(start=0, fixed=true))) - annotation (Placement(transformation(extent={{-70,-60},{-50,-40}}))); - Sink sink(redeclare package Medium = Medium, p0_par=100000) - annotation (Placement(transformation(extent={{50,-60},{70,-40}}))); - Source source1(redeclare package Medium = Medium, p0_par=200000) - annotation (Placement(transformation(extent={{-70,-90},{-50,-70}}))); - Sink sink1(redeclare package Medium = Medium, p0_par=100000) - annotation (Placement(transformation(extent={{50,-90},{70,-70}}))); - Modelica.Thermal.HeatTransfer.Sources.FixedTemperature fixedTemperature(T( - displayUnit="K") = 500) - annotation (Placement(transformation(extent={{-48,-120},{-28,-100}}))); - ThermofluidStream.Processes.FlowResistance flowResistance( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r=0.01, - l=10, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.laminarTurbulentPressureLoss (material=ThermofluidStream.Processes.Internal.Material.wood)) - annotation (Placement(transformation(extent={{20,-90},{40,-70}}))); - ThermofluidStream.Processes.FlowResistance flowResistance1( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r=0.01, - l=10, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.laminarTurbulentPressureLoss (material=ThermofluidStream.Processes.Internal.Material.wood)) - annotation (Placement(transformation(extent={{-40,-90},{-20,-70}}))); - Source source2(redeclare package Medium = MediumMix, p0_par=200000) - annotation (Placement(transformation(extent={{-70,10},{-50,30}}))); - Source source3(redeclare package Medium = MediumMix, p0_par=200000) - annotation (Placement(transformation(extent={{-70,-30},{-50,-10}}))); - Sink sink2(redeclare package Medium = MediumMix, p0_par=100000) - annotation (Placement(transformation(extent={{50,-10},{70,10}}))); - ThermofluidStream.Processes.FlowResistance flowResistance2( - redeclare package Medium = MediumMix, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r=0.01, - l=10, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.laminarTurbulentPressureLoss (material=ThermofluidStream.Processes.Internal.Material.wood)) - annotation (Placement(transformation(extent={{-40,10},{-20,30}}))); - ThermofluidStream.Processes.FlowResistance flowResistance3( - redeclare package Medium = MediumMix, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r=0.01, - l=10, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.laminarTurbulentPressureLoss (material=ThermofluidStream.Processes.Internal.Material.wood)) - annotation (Placement(transformation(extent={{-40,-30},{-20,-10}}))); - ThermofluidStream.Processes.FlowResistance flowResistance4( - redeclare package Medium = MediumMix, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r=0.01, - l=10, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.laminarTurbulentPressureLoss (material=ThermofluidStream.Processes.Internal.Material.wood)) - annotation (Placement(transformation(extent={{20,-10},{40,10}}))); - Source source4( - redeclare package Medium = MediumMix, - p0_par=200000, - Xi0_par={1,0}) - annotation (Placement(transformation(extent={{-70,80},{-50,100}}))); - Source source5( - redeclare package Medium = MediumMix, - p0_par=200000, - Xi0_par={0,1}) - annotation (Placement(transformation(extent={{-70,40},{-50,60}}))); - Sink sink3(redeclare package Medium = MediumMix, p0_par=100000) - annotation (Placement(transformation(extent={{50,60},{70,80}}))); - ThermofluidStream.Processes.FlowResistance flowResistance5( - redeclare package Medium = MediumMix, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r=0.1, - l=10, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.linearQuadraticPressureLoss (k=1e5)) - annotation (Placement(transformation(extent={{-40,80},{-20,100}}))); - ThermofluidStream.Processes.FlowResistance flowResistance6( - redeclare package Medium = MediumMix, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r=0.1, - l=10, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.linearQuadraticPressureLoss (k=2e5)) - annotation (Placement(transformation(extent={{-40,40},{-20,60}}))); - ThermofluidStream.Processes.FlowResistance flowResistance8( - redeclare package Medium = MediumMix, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r=0.1, - l=10, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.linearQuadraticPressureLoss (k=1e1)) - annotation (Placement(transformation(extent={{20,60},{40,80}}))); - Source source6(redeclare package Medium = Medium, p0_par=180000) - annotation (Placement(transformation(extent={{-70,-160},{-50,-140}}))); - Sink sink4(redeclare package Medium = Medium, p0_par=130000) - annotation (Placement(transformation(extent={{50,-200},{70,-180}}))); - ThermofluidStream.Processes.FlowResistance flowResistance7( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r=0.1, - l=1, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.laminarTurbulentPressureLoss (material=ThermofluidStream.Processes.Internal.Material.wood)) - annotation (Placement(transformation(extent={{-40,-160},{-20,-140}}))); - ThermofluidStream.Processes.FlowResistance flowResistance9( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r=0.1, - l=10, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.laminarTurbulentPressureLoss (material=ThermofluidStream.Processes.Internal.Material.wood)) - annotation (Placement(transformation(extent={{20,-200},{40,-180}}))); - Source source7(redeclare package Medium = Medium, p0_par=100000) - annotation (Placement(transformation(extent={{-70,110},{-50,130}}))); - Sink sink5(redeclare package Medium = Medium, p0_par=200000) - annotation (Placement(transformation(extent={{50,110},{70,130}}))); - ThermofluidStream.Processes.FlowResistance flowResistance10( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r(displayUnit="mm") = 0.01, - l=1, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.linearQuadraticPressureLoss (k=1e5)) - annotation (Placement(transformation(extent={{20,110},{40,130}}))); - ThermofluidStream.Processes.FlowResistance flowResistance11( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r(displayUnit="mm") = 0.01, - l=1, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.linearQuadraticPressureLoss (k=1e5)) - annotation (Placement(transformation(extent={{-40,110},{-20,130}}))); - Source source8( - redeclare package Medium = MediumMix, - p0_par=200000, - Xi0_par={1,0}) - annotation (Placement(transformation(extent={{-70,180},{-50,200}}))); - Source source9( - redeclare package Medium = MediumMix, - p0_par=100000, - Xi0_par={0,1}) - annotation (Placement(transformation(extent={{-70,140},{-50,160}}))); - Sink sink6(redeclare package Medium = MediumMix, p0_par=300000) - annotation (Placement(transformation(extent={{50,160},{70,180}}))); - ThermofluidStream.Processes.FlowResistance flowResistance12( - redeclare package Medium = MediumMix, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r=0.1, - l=10, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.linearQuadraticPressureLoss (k=1e5)) - annotation (Placement(transformation(extent={{-40,180},{-20,200}}))); - ThermofluidStream.Processes.FlowResistance flowResistance13( - redeclare package Medium = MediumMix, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r=0.1, - l=10, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.linearQuadraticPressureLoss (k=2e5)) - annotation (Placement(transformation(extent={{-40,140},{-20,160}}))); - ThermofluidStream.Processes.FlowResistance flowResistance14( - redeclare package Medium = MediumMix, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r=0.1, - l=10, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.linearQuadraticPressureLoss (k=1e1)) - annotation (Placement(transformation(extent={{20,160},{40,180}}))); - equation - connect(volume.inlet, source.outlet) annotation (Line( - points={{-30,-50},{-50,-50}}, - color={28,108,200}, - thickness=0.5)); - connect(volume.outlet, flexVolume1.inlet) annotation (Line( - points={{-10,-50},{10,-50}}, - color={28,108,200}, - thickness=0.5)); - connect(flexVolume1.outlet, sink.inlet) annotation (Line( - points={{30,-50},{50,-50}}, - color={28,108,200}, - thickness=0.5)); - - connect(fixedTemperature.port,heatportVolume. heatPort) - annotation (Line(points={{-28,-110},{0,-110},{0,-88}}, color={191,0,0})); - connect(heatportVolume.outlet,flowResistance. inlet) annotation (Line( - points={{10,-80},{20,-80}}, - color={28,108,200}, - thickness=0.5)); - connect(flowResistance.outlet,sink1. inlet) annotation (Line( - points={{40,-80},{50,-80}}, - color={28,108,200}, - thickness=0.5)); - connect(flowResistance1.inlet,source1. outlet) annotation (Line( - points={{-40,-80},{-50,-80}}, - color={28,108,200}, - thickness=0.5)); - connect(flowResistance1.outlet,heatportVolume. inlet) annotation (Line( - points={{-20,-80},{-10,-80}}, - color={28,108,200}, - thickness=0.5)); - connect(source2.outlet, flowResistance2.inlet) annotation (Line( - points={{-50,20},{-40,20}}, - color={28,108,200}, - thickness=0.5)); - connect(source3.outlet, flowResistance3.inlet) annotation (Line( - points={{-50,-20},{-40,-20}}, - color={28,108,200}, - thickness=0.5)); - connect(volumeMix.outlet, flowResistance4.inlet) annotation (Line( - points={{10,0},{20,0}}, - color={28,108,200}, - thickness=0.5)); - connect(sink2.inlet, flowResistance4.outlet) annotation (Line( - points={{50,0},{40,0}}, - color={28,108,200}, - thickness=0.5)); - connect(flowResistance3.outlet, volumeMix.inlet[1]) annotation (Line( - points={{-20,-20},{-16,-20},{-16,-0.5},{-10,-0.5}}, - color={28,108,200}, - thickness=0.5)); - connect(flowResistance2.outlet, volumeMix.inlet[2]) annotation (Line( - points={{-20,20},{-16,20},{-16,0.5},{-10,0.5}}, - color={28,108,200}, - thickness=0.5)); - connect(source4.outlet,flowResistance5. inlet) annotation (Line( - points={{-50,90},{-40,90}}, - color={28,108,200}, - thickness=0.5)); - connect(source5.outlet,flowResistance6. inlet) annotation (Line( - points={{-50,50},{-40,50}}, - color={28,108,200}, - thickness=0.5)); - connect(flowResistance6.outlet, volumeMix1.inlet[1]) annotation (Line( - points={{-20,50},{-16,50},{-16,69.5},{-10,69.5}}, - color={28,108,200}, - thickness=0.5)); - connect(flowResistance5.outlet, volumeMix1.inlet[2]) annotation (Line( - points={{-20,90},{-16,90},{-16,70.5},{-10,70.5}}, - color={28,108,200}, - thickness=0.5)); - connect(sink3.inlet, flowResistance8.outlet) annotation (Line( - points={{50,70},{40,70}}, - color={28,108,200}, - thickness=0.5)); - connect(volumeMix1.outlet, flowResistance8.inlet) annotation (Line( - points={{10,70},{20,70}}, - color={28,108,200}, - thickness=0.5)); - connect(source6.outlet, flowResistance7.inlet) annotation (Line( - points={{-50,-150},{-40,-150}}, - color={28,108,200}, - thickness=0.5)); - connect(heatportVolume1.inlet, flowResistance7.outlet) - annotation (Line( - points={{-8,-150},{-20,-150}}, - color={28,108,200}, - thickness=0.5)); - connect(heatportVolume2.outlet, flowResistance9.inlet) - annotation (Line( - points={{10,-190},{20,-190}}, - color={28,108,200}, - thickness=0.5)); - connect(sink4.inlet, flowResistance9.outlet) annotation (Line( - points={{50,-190},{40,-190}}, - color={28,108,200}, - thickness=0.5)); - connect(heatportVolume3.heatPort, heatportVolume.heatPort) annotation (Line(points={{42,-110},{0,-110},{0,-88}}, - color={191,0,0})); - connect(volumeMix2.heatPort, heatportVolume.heatPort) annotation (Line(points={{42,-140},{28,-140},{28,-110},{0,-110},{0,-88}}, - color={191,0,0})); - connect(volume1.outlet, flowResistance10.inlet) annotation (Line( - points={{8,120},{20,120}}, - color={28,108,200}, - thickness=0.5)); - connect(flowResistance10.outlet, sink5.inlet) annotation (Line( - points={{40,120},{50,120}}, - color={28,108,200}, - thickness=0.5)); - connect(volume1.inlet, flowResistance11.outlet) annotation (Line( - points={{-12,120},{-20,120}}, - color={28,108,200}, - thickness=0.5)); - connect(flowResistance11.inlet, source7.outlet) annotation (Line( - points={{-40,120},{-50,120}}, - color={28,108,200}, - thickness=0.5)); - connect(source8.outlet, flowResistance12.inlet) annotation (Line( - points={{-50,190},{-40,190}}, - color={28,108,200}, - thickness=0.5)); - connect(source9.outlet, flowResistance13.inlet) annotation (Line( - points={{-50,150},{-40,150}}, - color={28,108,200}, - thickness=0.5)); - connect(flowResistance13.outlet, volumeMix3.inlet[1]) - annotation (Line( - points={{-20,150},{-14,150},{-14,169.5},{-8,169.5}}, - color={28,108,200}, - thickness=0.5)); - connect(flowResistance12.outlet, volumeMix3.inlet[2]) - annotation (Line( - points={{-20,190},{-14,190},{-14,170.5},{-8,170.5}}, - color={28,108,200}, - thickness=0.5)); - connect(sink6.inlet, flowResistance14.outlet) annotation (Line( - points={{50,170},{40,170}}, - color={28,108,200}, - thickness=0.5)); - connect(volumeMix3.outlet, flowResistance14.inlet) annotation (Line( - points={{12,170},{20,170}}, - color={28,108,200}, - thickness=0.5)); - annotation (experiment(StopTime=1, Tolerance=1e-6, Interval=0.001), - Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}})), - Diagram( - coordinateSystem(preserveAspectRatio=false, extent={{-100,-200},{100,200}})), - Documentation(info=" -

This test purposely violates the asserts for reversed mass-flows to test the behavior of volumes for prolonged reversed massflow for some of the volumes. The assert is set to warning.

-


Owner: Michael Meißner

-")); - end Volumes; - - model TerminalSourceSink "Test for Terminal source and sink model" - extends Modelica.Icons.Example; - - replaceable package Medium = ThermofluidStream.Media.myMedia.Air.SimpleAir constrainedby ThermofluidStream.Media.myMedia.Interfaces.PartialMedium - "Medium package" annotation (Documentation(info=" -

-Medium package used in the Test. -

-")); - - inner ThermofluidStream.DropOfCommons dropOfCommons annotation (Placement(transformation(extent={{50,-70},{70,-50}}))); - Sink sink2(redeclare package Medium = Medium, - pressureFromInput=true, - p0_par=100000) - annotation (Placement(transformation(extent={{8,4},{28,24}}))); - Modelica.Blocks.Sources.Pulse pulse( - amplitude=5e4, - width=35, - period=2, - offset=0.8e5, - startTime=0.2) - annotation (Placement(transformation(extent={{-60,-10},{-40,10}}))); - TerminalSource terminalSource(redeclare package Medium = Medium, TC=0.1) annotation (Placement(transformation(extent={{-26,4},{-6,24}}))); - TerminalSink terminalSink(redeclare package Medium = Medium) annotation (Placement(transformation(extent={{8,-26},{28,-6}}))); - Source source(redeclare package Medium = Medium, pressureFromInput=true) annotation (Placement(transformation(extent={{-26,-26},{-6,-6}}))); - equation - - connect(pulse.y, sink2.p0_var) annotation (Line(points={{-39,0},{26,0},{26,14},{20,14}}, color={0,0,127})); - connect(sink2.inlet, terminalSource.outlet) annotation (Line( - points={{8,14},{-6,14}}, - color={28,108,200}, - thickness=0.5)); - connect(source.outlet, terminalSink.inlet) annotation (Line( - points={{-6,-16},{8,-16}}, - color={28,108,200}, - thickness=0.5)); - connect(source.p0_var, sink2.p0_var) annotation (Line(points={{-18,-10},{-26,-10},{-26,0},{26,0},{26,14},{20,14}}, color={0,0,127})); - annotation (experiment(StopTime=10, Tolerance=1e-6, Interval=0.01), - Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( - coordinateSystem(preserveAspectRatio=false)), - Documentation(info=" -

Owner: Michael Meißner

-")); - end TerminalSourceSink; - - model VolumesDirectCoupling "Test Volumes" - extends Modelica.Icons.Example; - - replaceable package Medium = ThermofluidStream.Media.myMedia.Water.StandardWater constrainedby ThermofluidStream.Media.myMedia.Interfaces.PartialMedium - "Medium package" - annotation (choicesAllMatching=true, Documentation(info=" -

-Medium package used in the Test. -

-")); - - package MediumMix = ThermofluidStream.Media.myMedia.IdealGases.MixtureGases.CombustionAir - "Medium package" - annotation (Documentation(info=" -

-Medium package used in the Test of the MixVolumes. -

-")); - - inner ThermofluidStream.DropOfCommons dropOfCommons(k_volume_damping=0.5, assertionLevel=AssertionLevel.warning) - annotation (Placement(transformation(extent={{70,-148},{90,-128}}))); - Sink sink4(redeclare package Medium = Medium, p0_par=130000) - annotation (Placement(transformation(extent={{36,-10},{56,10}}))); - Source source(redeclare package Medium = Medium, - p0_par=200000, - outlet(m_flow(start=0, fixed=true))) - annotation (Placement(transformation(extent={{-58,-96},{-38,-76}}))); - Sink sink1(redeclare package Medium = Medium, p0_par=130000) - annotation (Placement(transformation(extent={{36,-30},{56,-10}}))); - Source source1(redeclare package Medium = Medium, - p0_par=200000, - outlet(m_flow(start=0, fixed=true))) - annotation (Placement(transformation(extent={{-58,-118},{-38,-98}}))); - Sink sink2(redeclare package Medium = Medium, p0_par=130000) - annotation (Placement(transformation(extent={{36,-50},{56,-30}}))); - Sink sink3(redeclare package Medium = Medium, p0_par=101000) - annotation (Placement(transformation(extent={{36,-76},{56,-56}}))); - equation - - connect(heatportVolume2.outlet, sink4.inlet) annotation (Line( - points={{10,0},{36,0}}, - color={28,108,200}, - thickness=0.5)); - connect(source.outlet, heatportVolume1.inlet) annotation (Line( - points={{-38,-86},{-10,-86}}, - color={28,108,200}, - thickness=0.5)); - connect(heatportVolume4.inlet, heatportVolume3.outlet) annotation (Line( - points={{10,30},{-10,30}}, - color={28,108,200}, - thickness=0.5)); - connect(heatportVolume6.inlet, heatportVolume5.outlet) annotation (Line( - points={{10,60},{-10,60}}, - color={28,108,200}, - thickness=0.5)); - connect(heatportVolume7.outlet, sink1.inlet) annotation (Line( - points={{10,-20},{36,-20}}, - color={28,108,200}, - thickness=0.5)); - connect(heatportVolume9.inlet, heatportVolume8.outlet) annotation (Line( - points={{10,88},{-10,88}}, - color={28,108,200}, - thickness=0.5)); - connect(source1.outlet, heatportVolume10.inlet) annotation (Line( - points={{-38,-108},{-10,-108}}, - color={28,108,200}, - thickness=0.5)); - connect(heatportVolume11.outlet, sink2.inlet) annotation (Line( - points={{10,-40},{36,-40}}, - color={28,108,200}, - thickness=0.5)); - connect(heatportVolume13.inlet, heatportVolume12.outlet) - annotation (Line( - points={{10,112},{-10,112}}, - color={28,108,200}, - thickness=0.5)); - connect(heatportVolume14.outlet, sink3.inlet) annotation (Line( - points={{10,-66},{36,-66}}, - color={28,108,200}, - thickness=0.5)); - annotation (experiment( - StopTime=0.05, - Interval=5e-06, - Tolerance=1e-07, - __Dymola_Algorithm="Dassl"), - Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}})), - Diagram( - coordinateSystem(preserveAspectRatio=false, extent={{-100,-160},{100,160}})), - Documentation(info=" -

This test uses deceased tolerance and saves more points (smaller output interval) because of the different time-scales and relative stiff equation system.

-


Owner: Michael Meißner

-")); - end VolumesDirectCoupling; - - model DynamicBoundaries "Test for DynamicInflow and Outflow" - extends Modelica.Icons.Example; - - package Medium = ThermofluidStream.Media.myMedia.Water.StandardWater; - - Source source(redeclare package Medium=Medium, p0_par=101000) - annotation (Placement(transformation(extent={{-80,-10},{-60,10}}))); - DynamicPressureInflow dynamicPressureInflow(redeclare package Medium=Medium, - areaFromInput=true, - velocityFromInput=true) - annotation (Placement(transformation(extent={{-50,-10},{-30,10}}))); - Sink sink(redeclare package Medium=Medium, p0_par=100000) - annotation (Placement(transformation(extent={{60,-10},{80,10}}))); - ThermofluidStream.Processes.FlowResistance flowResistance( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r(displayUnit="mm") = 0.005, - l=10, - computeL=false, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.laminarPressureLoss) - annotation (Placement(transformation(extent={{-10,-10},{10,10}}))); - Source source1(redeclare package Medium=Medium, p0_par=100000) - annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}))); - DynamicPressureInflow dynamicPressureInflow1(redeclare package Medium=Medium, - A_par=0.005, - v_in_par=-10, - assumeConstantDensity=true) - annotation (Placement(transformation(extent={{-50,-50},{-30,-30}}))); - Sink sink1(redeclare package Medium=Medium, p0_par=100000) - annotation (Placement(transformation(extent={{60,-50},{80,-30}}))); - ThermofluidStream.Processes.FlowResistance flowResistance1( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - m_flow_0=-1, - r(displayUnit="mm") = 0.005, - l=10, - L_value=1000, - computeL=false, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.laminarPressureLoss) - annotation (Placement(transformation(extent={{-10,-50},{10,-30}}))); - - Modelica.Blocks.Sources.Ramp ramp( - height=1, - duration=0.5, - startTime=0.4) annotation (Placement(transformation(extent={{-80,20},{-60,40}}))); - inner ThermofluidStream.DropOfCommons dropOfCommons(m_flow_reg=0.01) annotation (Placement(transformation(extent={{60,20},{80,40}}))); - Modelica.Blocks.Sources.Ramp ramp1( - height=-0.98e-3, - duration=0.4, - offset=1e-3, - startTime=0) annotation (Placement(transformation(extent={{0,20},{-20,40}}))); - Source source2(redeclare package Medium = Medium, p0_par=101000) - annotation (Placement(transformation(extent={{-80,50},{-60,70}}))); - DynamicPressureInflow dynamicPressureInflow2( - redeclare package Medium = Medium, - areaFromInput=false, - velocityFromInput=false, - assumeConstantDensity=true) - annotation (Placement(transformation(extent={{-50,50},{-30,70}}))); - Sink sink2(redeclare package Medium = Medium, p0_par=100000) - annotation (Placement(transformation(extent={{60,50},{80,70}}))); - ThermofluidStream.Processes.FlowResistance flowResistance2( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r(displayUnit="mm") = 0.005, - l=10, - computeL=false, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.laminarPressureLoss) - annotation (Placement(transformation(extent={{-10,50},{10,70}}))); - Modelica.Blocks.Sources.Ramp ramp2( - height=1, - duration=0.5, - startTime=0.4) annotation (Placement(transformation(extent={{0,80},{20,100}}))); - Modelica.Blocks.Sources.Ramp ramp3( - height=-0.95e-3, - duration=0.4, - offset=1e-3, - startTime=0) annotation (Placement(transformation(extent={{80,80},{60,100}}))); - Source source3(redeclare package Medium = Medium, p0_par=100000) - annotation (Placement(transformation(extent={{-80,-70},{-60,-50}}))); - DynamicPressureInflow dynamicPressureInflow3( - redeclare package Medium = Medium, - A_par=0.01, - v_in_par=0, - assumeConstantDensity=true) - annotation (Placement(transformation(extent={{-50,-70},{-30,-50}}))); - Sink sink3(redeclare package Medium = Medium, p0_par=100000) - annotation (Placement(transformation(extent={{60,-70},{80,-50}}))); - ThermofluidStream.Processes.FlowResistance flowResistance3( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - m_flow_0=-1, - r(displayUnit="mm") = 0.005, - l=10, - L_value=1000, - computeL=false, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.laminarPressureLoss) - annotation (Placement(transformation(extent={{-10,-70},{10,-50}}))); - Source source4(redeclare package Medium = Medium, p0_par=100000) - annotation (Placement(transformation(extent={{-80,-90},{-60,-70}}))); - DynamicPressureInflow dynamicPressureInflow4( - redeclare package Medium = Medium, - A_par=0.01, - v_in_par=0, - assumeConstantDensity=true) - annotation (Placement(transformation(extent={{-50,-90},{-30,-70}}))); - Sink sink4(redeclare package Medium = Medium, p0_par=100000) - annotation (Placement(transformation(extent={{60,-90},{80,-70}}))); - ThermofluidStream.Processes.FlowResistance flowResistance4( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - m_flow_0=1, - r(displayUnit="mm") = 0.005, - l=10, - L_value=1000, - computeL=false, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.laminarPressureLoss) - annotation (Placement(transformation(extent={{-10,-90},{10,-70}}))); - Source source5(redeclare package Medium = Medium, p0_par=100000) - annotation (Placement(transformation(extent={{-80,-30},{-60,-10}}))); - DynamicPressureInflow dynamicPressureInflow5( - redeclare package Medium = Medium, - A_par=0.005, - v_in_par=10, - assumeConstantDensity=true) - annotation (Placement(transformation(extent={{-50,-30},{-30,-10}}))); - Sink sink5(redeclare package Medium = Medium, p0_par=100000) - annotation (Placement(transformation(extent={{60,-30},{80,-10}}))); - ThermofluidStream.Processes.FlowResistance flowResistance5( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - m_flow_0=-1, - r(displayUnit="mm") = 0.005, - l=10, - L_value=1000, - computeL=false, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.laminarPressureLoss) - annotation (Placement(transformation(extent={{-10,-30},{10,-10}}))); - equation - connect(source.outlet, dynamicPressureInflow.inlet) annotation (Line( - points={{-60,0},{-50,0}}, - color={28,108,200}, - thickness=0.5)); - connect(sink.inlet, dynamicPressureOutflow.outlet) annotation (Line( - points={{60,0},{50,0}}, - color={28,108,200}, - thickness=0.5)); - connect(dynamicPressureInflow.outlet, flowResistance.inlet) - annotation (Line( - points={{-30,0},{-10,0}}, - color={28,108,200}, - thickness=0.5)); - connect(dynamicPressureOutflow.inlet, flowResistance.outlet) - annotation (Line( - points={{30,0},{10,0}}, - color={28,108,200}, - thickness=0.5)); - connect(source1.outlet, dynamicPressureInflow1.inlet) - annotation (Line( - points={{-60,-40},{-50,-40}}, - color={28,108,200}, - thickness=0.5)); - connect(sink1.inlet, dynamicPressureOutflow1.outlet) annotation (Line( - points={{60,-40},{50,-40}}, - color={28,108,200}, - thickness=0.5)); - connect(dynamicPressureInflow1.outlet, flowResistance1.inlet) - annotation (Line( - points={{-30,-40},{-10,-40}}, - color={28,108,200}, - thickness=0.5)); - connect(dynamicPressureOutflow1.inlet, flowResistance1.outlet) - annotation (Line( - points={{30,-40},{10,-40}}, - color={28,108,200}, - thickness=0.5)); - connect(dynamicPressureInflow.v_in_var, ramp.y) annotation (Line(points={{-40,10},{-40,30},{-59,30}}, color={0,0,127})); - connect(dynamicPressureInflow.A_var, ramp1.y) annotation (Line(points={{-34,10},{-34,30},{-21,30}}, color={0,0,127})); - connect(source2.outlet,dynamicPressureInflow2. inlet) - annotation (Line( - points={{-60,60},{-50,60}}, - color={28,108,200}, - thickness=0.5)); - connect(sink2.inlet,dynamicPressureOutflow2. outlet) annotation (Line( - points={{60,60},{50,60}}, - color={28,108,200}, - thickness=0.5)); - connect(dynamicPressureInflow2.outlet,flowResistance2. inlet) - annotation (Line( - points={{-30,60},{-10,60}}, - color={28,108,200}, - thickness=0.5)); - connect(dynamicPressureOutflow2.inlet,flowResistance2. outlet) - annotation (Line( - points={{30,60},{10,60}}, - color={28,108,200}, - thickness=0.5)); - connect(ramp2.y,dynamicPressureOutflow2. v_out_var) annotation (Line(points={{21,90},{34,90},{34,70}}, color={0,0,127})); - connect(ramp3.y,dynamicPressureOutflow2. A_var) annotation (Line(points={{59,90},{40,90},{40,70}}, color={0,0,127})); - connect(source3.outlet,dynamicPressureInflow3. inlet) - annotation (Line( - points={{-60,-60},{-50,-60}}, - color={28,108,200}, - thickness=0.5)); - connect(sink3.inlet,dynamicPressureOutflow3. outlet) annotation (Line( - points={{60,-60},{50,-60}}, - color={28,108,200}, - thickness=0.5)); - connect(dynamicPressureInflow3.outlet,flowResistance3. inlet) - annotation (Line( - points={{-30,-60},{-10,-60}}, - color={28,108,200}, - thickness=0.5)); - connect(dynamicPressureOutflow3.inlet,flowResistance3. outlet) - annotation (Line( - points={{30,-60},{10,-60}}, - color={28,108,200}, - thickness=0.5)); - connect(source4.outlet,dynamicPressureInflow4. inlet) - annotation (Line( - points={{-60,-80},{-50,-80}}, - color={28,108,200}, - thickness=0.5)); - connect(sink4.inlet,dynamicPressureOutflow4. outlet) annotation (Line( - points={{60,-80},{50,-80}}, - color={28,108,200}, - thickness=0.5)); - connect(dynamicPressureInflow4.outlet,flowResistance4. inlet) - annotation (Line( - points={{-30,-80},{-10,-80}}, - color={28,108,200}, - thickness=0.5)); - connect(dynamicPressureOutflow4.inlet,flowResistance4. outlet) - annotation (Line( - points={{30,-80},{10,-80}}, - color={28,108,200}, - thickness=0.5)); - connect(source5.outlet,dynamicPressureInflow5. inlet) - annotation (Line( - points={{-60,-20},{-50,-20}}, - color={28,108,200}, - thickness=0.5)); - connect(sink5.inlet,dynamicPressureOutflow5. outlet) annotation (Line( - points={{60,-20},{50,-20}}, - color={28,108,200}, - thickness=0.5)); - connect(dynamicPressureInflow5.outlet,flowResistance5. inlet) - annotation (Line( - points={{-30,-20},{-10,-20}}, - color={28,108,200}, - thickness=0.5)); - connect(dynamicPressureOutflow5.inlet,flowResistance5. outlet) - annotation (Line( - points={{30,-20},{10,-20}}, - color={28,108,200}, - thickness=0.5)); - annotation ( - experiment(StopTime=1, Tolerance=1e-6, Interval=0.001), - Documentation(info=" -

Owner: Michael Meißner

-")); - end DynamicBoundaries; - - model PhaseSeperator - extends Modelica.Icons.Example; - - package Medium = ThermofluidStream.Media.myMedia.Water.StandardWater; - - Boundaries.Source source( - redeclare package Medium = Medium, - setEnthalpy=true, - enthalpyFromInput=true, - p0_par=120000, - h0_par=2000) annotation (Placement(transformation(extent={{-90,10},{-70,30}}))); - Boundaries.Sink sink(redeclare package Medium = Medium, p0_par=100000) annotation (Placement(transformation(extent={{76,-30},{96,-10}}))); - - ThermofluidStream.Sensors.TwoPhaseSensorSelect twoPhaseSensorSelect( - redeclare package Medium = Medium, - digits=2, - quantity=ThermofluidStream.Sensors.Internal.Types.TwoPhaseQuantities.x_kgpkg) annotation (Placement(transformation(extent={{-56,-38},{-36,-18}}))); - ThermofluidStream.Sensors.TwoPhaseSensorSelect twoPhaseSensorSelect1( - redeclare package Medium = Medium, - digits=2, - quantity=ThermofluidStream.Sensors.Internal.Types.TwoPhaseQuantities.x_kgpkg) annotation (Placement(transformation(extent={{20,-50},{40,-30}}))); - ThermofluidStream.Sensors.TwoPhaseSensorSelect twoPhaseSensorSelect2( - redeclare package Medium = Medium, - digits=2, - quantity=ThermofluidStream.Sensors.Internal.Types.TwoPhaseQuantities.x_kgpkg) annotation (Placement(transformation(extent={{20,30},{40,50}}))); - ThermofluidStream.Sensors.TwoPhaseSensorSelect twoPhaseSensorSelect3( - redeclare package Medium = Medium, - digits=2, - quantity=ThermofluidStream.Sensors.Internal.Types.TwoPhaseQuantities.x_kgpkg) annotation (Placement(transformation(extent={{64,-52},{84,-32}}))); - Modelica.Blocks.Sources.TimeTable - timeTable( - table=[0.0,1500e3; 24.9,1500e3; 25.1,3500e3; 49.9,3500e3; 50.1,1500e3; 74.9,1500e3; 75.1,410e3; 99.9,410e3; 100.1,1500e3; 124.9,1500e3; 1e10, - 1500e3], - offset=0, - startTime=0) annotation (Placement(transformation(extent={{-120,-16},{-100,4}}))); - ThermofluidStream.Processes.FlowResistance flowResistance1( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r(displayUnit="cm") = 0.05, - l=1, - computeL=false, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.linearQuadraticPressureLoss (k=5000)) - annotation (Placement(transformation(extent={{-40,10},{-20,30}}))); - ThermofluidStream.Processes.FlowResistance flowResistance2( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r(displayUnit="cm") = 0.05, - l=1, - computeL=false, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.linearQuadraticPressureLoss (k=5000)) - annotation (Placement(transformation(extent={{-40,-30},{-20,-10}}))); - ThermofluidStream.Processes.FlowResistance flowResistance( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r(displayUnit="cm") = 0.05, - l=1, - computeL=false, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.linearQuadraticPressureLoss (k=5000)) - annotation (Placement(transformation(extent={{30,10},{50,30}}))); - ThermofluidStream.Processes.FlowResistance flowResistance3( - redeclare package Medium = Medium, - initM_flow=ThermofluidStream.Utilities.Types.InitializationMethods.state, - r(displayUnit="cm") = 0.05, - l=1, - computeL=false, - redeclare function pLoss = ThermofluidStream.Processes.Internal.FlowResistance.linearQuadraticPressureLoss (k=5000)) - annotation (Placement(transformation(extent={{30,-30},{50,-10}}))); - ThermofluidStream.Sensors.TwoPhaseSensorSelect twoPhaseSensorSelect4( - redeclare package Medium = Medium, - digits=2, - quantity=ThermofluidStream.Sensors.Internal.Types.TwoPhaseQuantities.x_kgpkg) annotation (Placement(transformation(extent={{-8,-50},{12,-30}}))); - ThermofluidStream.Sensors.TwoPhaseSensorSelect twoPhaseSensorSelect5( - redeclare package Medium = Medium, - digits=2, - quantity=ThermofluidStream.Sensors.Internal.Types.TwoPhaseQuantities.x_kgpkg) annotation (Placement(transformation(extent={{-8,30},{12,50}}))); - ThermofluidStream.Sensors.SingleSensorSelect singleSensorSelect( - redeclare package Medium = Medium, - digits=2, - quantity=ThermofluidStream.Sensors.Internal.Types.Quantities.p_bar) annotation (Placement(transformation(extent={{-8,38},{12,58}}))); - ThermofluidStream.Sensors.SingleSensorSelect singleSensorSelect1( - redeclare package Medium = Medium, - digits=2, - quantity=ThermofluidStream.Sensors.Internal.Types.Quantities.p_bar) annotation (Placement(transformation(extent={{20,38},{40,58}}))); - ThermofluidStream.Sensors.SingleSensorSelect singleSensorSelect2( - redeclare package Medium = Medium, - digits=2, - quantity=ThermofluidStream.Sensors.Internal.Types.Quantities.p_bar) annotation (Placement(transformation(extent={{-8,-58},{12,-38}}))); - ThermofluidStream.Sensors.SingleSensorSelect singleSensorSelect3( - redeclare package Medium = Medium, - digits=2, - quantity=ThermofluidStream.Sensors.Internal.Types.Quantities.p_bar) annotation (Placement(transformation(extent={{20,-58},{40,-38}}))); - ThermofluidStream.Sensors.SingleSensorSelect singleSensorSelect4( - redeclare package Medium = Medium, - digits=2, - quantity=ThermofluidStream.Sensors.Internal.Types.Quantities.p_bar) annotation (Placement(transformation(extent={{64,-60},{84,-40}}))); - ThermofluidStream.Sensors.SingleSensorSelect singleSensorSelect5( - redeclare package Medium = Medium, - digits=2, - quantity=ThermofluidStream.Sensors.Internal.Types.Quantities.p_bar) annotation (Placement(transformation(extent={{-56,-46},{-36,-26}}))); - Boundaries.Source source1( - redeclare package Medium = Medium, - setEnthalpy=true, - enthalpyFromInput=true, - p0_par=120000, - h0_par=2000) annotation (Placement(transformation(extent={{-90,-30},{-70,-10}}))); - ThermofluidStream.Sensors.TwoPhaseSensorSelect twoPhaseSensorSelect6( - redeclare package Medium = Medium, - digits=2, - quantity=ThermofluidStream.Sensors.Internal.Types.TwoPhaseQuantities.x_kgpkg) annotation (Placement(transformation(extent={{-56,20},{-36,40}}))); - ThermofluidStream.Sensors.SingleSensorSelect singleSensorSelect6( - redeclare package Medium = Medium, - digits=2, - quantity=ThermofluidStream.Sensors.Internal.Types.Quantities.p_bar) annotation (Placement(transformation(extent={{-56,28},{-36,48}}))); - Boundaries.Sink sink1(redeclare package Medium = Medium, p0_par=100000) annotation (Placement(transformation(extent={{76,10},{96,30}}))); - ThermofluidStream.Sensors.TwoPhaseSensorSelect twoPhaseSensorSelect7( - redeclare package Medium = Medium, - digits=2, - quantity=ThermofluidStream.Sensors.Internal.Types.TwoPhaseQuantities.x_kgpkg) annotation (Placement(transformation(extent={{64,32},{84,52}}))); - ThermofluidStream.Sensors.SingleSensorSelect singleSensorSelect7( - redeclare package Medium = Medium, - digits=2, - quantity=ThermofluidStream.Sensors.Internal.Types.Quantities.p_bar) annotation (Placement(transformation(extent={{64,40},{84,60}}))); - inner ThermofluidStream.DropOfCommons dropOfCommons(assertionLevel=AssertionLevel.warning) - annotation (Placement(transformation(extent={{-86,-72},{-66,-52}}))); - equation - connect(source.h0_var, timeTable.y) annotation (Line(points={{-82,20},{-90,20},{-90,-6},{-99,-6}}, color={0,0,127})); - connect(twoPhaseSensorSelect1.inlet, accumulator.outlet) - annotation (Line( - points={{20,-40},{16,-40},{16,-20},{10,-20}}, - color={28,108,200}, - thickness=0.5)); - connect(twoPhaseSensorSelect2.inlet,receiver. outlet) - annotation (Line( - points={{20,40},{16,40},{16,20},{10,20}}, - color={28,108,200}, - thickness=0.5)); - connect(flowResistance1.outlet,receiver. inlet) annotation (Line( - points={{-20,20},{-10,20}}, - color={28,108,200}, - thickness=0.5)); - connect(accumulator.inlet, flowResistance2.outlet) annotation (Line( - points={{-10,-20},{-20,-20}}, - color={28,108,200}, - thickness=0.5)); - connect(flowResistance3.inlet, accumulator.outlet) annotation (Line( - points={{30,-20},{10,-20}}, - color={28,108,200}, - thickness=0.5)); - connect(flowResistance.inlet,receiver. outlet) annotation (Line( - points={{30,20},{10,20}}, - color={28,108,200}, - thickness=0.5)); - connect(twoPhaseSensorSelect4.inlet, flowResistance2.outlet) - annotation (Line( - points={{-8,-40},{-14,-40},{-14,-20},{-20,-20}}, - color={28,108,200}, - thickness=0.5)); - connect(twoPhaseSensorSelect5.inlet,receiver. inlet) - annotation (Line( - points={{-8,40},{-14,40},{-14,20},{-10,20}}, - color={28,108,200}, - thickness=0.5)); - connect(singleSensorSelect.inlet,receiver. inlet) - annotation (Line( - points={{-8,48},{-14,48},{-14,20},{-10,20}}, - color={28,108,200}, - thickness=0.5)); - connect(singleSensorSelect1.inlet,receiver. outlet) - annotation (Line( - points={{20,48},{16,48},{16,20},{10,20}}, - color={28,108,200}, - thickness=0.5)); - connect(singleSensorSelect3.inlet, accumulator.outlet) - annotation (Line( - points={{20,-48},{16,-48},{16,-20},{10,-20}}, - color={28,108,200}, - thickness=0.5)); - connect(singleSensorSelect2.inlet, flowResistance2.outlet) - annotation (Line( - points={{-8,-48},{-14,-48},{-14,-20},{-20,-20}}, - color={28,108,200}, - thickness=0.5)); - connect(source.outlet, flowResistance1.inlet) annotation (Line( - points={{-70,20},{-40,20}}, - color={28,108,200}, - thickness=0.5)); - connect(source1.outlet, flowResistance2.inlet) - annotation (Line( - points={{-70,-20},{-56,-20},{-56,-20},{-40,-20}}, - color={28,108,200}, - thickness=0.5)); - connect(source1.h0_var, timeTable.y) annotation (Line(points={{-82,-20},{-90,-20},{-90,-6},{-99,-6}}, color={0,0,127})); - connect(twoPhaseSensorSelect.inlet, flowResistance2.inlet) - annotation (Line( - points={{-56,-28},{-60,-28},{-60,-20},{-40,-20}}, - color={28,108,200}, - thickness=0.5)); - connect(singleSensorSelect5.inlet, flowResistance2.inlet) - annotation (Line( - points={{-56,-36},{-60,-36},{-60,-20},{-40,-20}}, - color={28,108,200}, - thickness=0.5)); - connect(singleSensorSelect6.inlet, flowResistance1.inlet) - annotation (Line( - points={{-56,38},{-60,38},{-60,20},{-40,20}}, - color={28,108,200}, - thickness=0.5)); - connect(twoPhaseSensorSelect6.inlet, flowResistance1.inlet) - annotation (Line( - points={{-56,30},{-60,30},{-60,20},{-40,20}}, - color={28,108,200}, - thickness=0.5)); - connect(sink.inlet, flowResistance3.outlet) annotation (Line( - points={{76,-20},{50,-20}}, - color={28,108,200}, - thickness=0.5)); - connect(sink1.inlet, flowResistance.outlet) annotation (Line( - points={{76,20},{50,20}}, - color={28,108,200}, - thickness=0.5)); - connect(singleSensorSelect4.inlet, flowResistance3.outlet) - annotation (Line( - points={{64,-50},{60,-50},{60,-20},{50,-20}}, - color={28,108,200}, - thickness=0.5)); - connect(twoPhaseSensorSelect3.inlet, flowResistance3.outlet) - annotation (Line( - points={{64,-42},{60,-42},{60,-20},{50,-20}}, - color={28,108,200}, - thickness=0.5)); - connect(twoPhaseSensorSelect7.inlet, flowResistance.outlet) - annotation (Line( - points={{64,42},{60,42},{60,20},{50,20}}, - color={28,108,200}, - thickness=0.5)); - connect(singleSensorSelect7.inlet, flowResistance.outlet) - annotation (Line( - points={{64,50},{60,50},{60,20},{50,20}}, - color={28,108,200}, - thickness=0.5)); - annotation (Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}})), - Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-120,-100},{120,100}})), - experiment(StopTime=125, Tolerance=1e-6, Interval=0.125, __Dymola_Algorithm="Dassl"), - Documentation(info=" -

Owner: Michael Meißner

-")); - end PhaseSeperator; annotation (Documentation(info="

Test package for the Boundaries package of ThermofluidStream. @@ -1461,7 +482,7 @@ Test package for the Boundaries package of ThermofluidStream. outer Modelica.Fluid.System system "System wide properties"; - parameter Real L=1e-5; + parameter Real L=dropOfCommons.L; parameter Boolean useInlet = false "If true inlet is added"; parameter Boolean useOutlet = true "If true outlet is added"; diff --git a/Chemical/DropOfCommons.mo b/Chemical/DropOfCommons.mo index 306f02d..498aa62 100644 --- a/Chemical/DropOfCommons.mo +++ b/Chemical/DropOfCommons.mo @@ -1,7 +1,7 @@ within Chemical; model DropOfCommons "Model for global parameters" - parameter Chemical.Utilities.Units.Inertance L=1e-5 "Inertance of the molar flow through electro-chemical process" annotation (Dialog(tab="Advanced")); + parameter Chemical.Utilities.Units.Inertance L=1e-8 "Inertance of the molar flow through electro-chemical process" annotation (Dialog(tab="Advanced")); parameter Modelica.Units.SI.MolarFlowRate n_flow_reg = 0.01 "Regularization threshold of molar flow rate" annotation(Dialog(group="Regularization")); diff --git a/Chemical/Examples.mo b/Chemical/Examples.mo index 474dc69..d22b139 100644 --- a/Chemical/Examples.mo +++ b/Chemical/Examples.mo @@ -409,11 +409,11 @@ extends Modelica.Icons.ExamplesPackage; annotation (Placement(transformation(extent={{58,-68},{78,-48}}))); equation connect(H2_gas.port_a, reaction.substrates[1]) annotation (Line( - points={{-78,-16},{-74,-16},{-74,4},{-68,4}}, + points={{-78,-16},{-74,-16},{-74,1},{-68,1}}, color={158,66,200}, thickness=1)); connect(O2_gas.port_a, reaction.substrates[2]) annotation (Line( - points={{-78,20},{-74,20},{-74,0},{-68,0}}, + points={{-78,20},{-74,20},{-74,3},{-68,3}}, color={158,66,200}, thickness=1)); connect(H2_gas.solution, idealGas.solution) annotation (Line( @@ -443,11 +443,11 @@ extends Modelica.Icons.ExamplesPackage; connect(reaction.products[1], H2O_gas.port_a) annotation (Line(points={{-48,2}, {-34,2}}, color={158,66,200})); connect(H2_gas1.port_a, reaction1.substrates[1]) annotation (Line( - points={{48,-18},{52,-18},{52,2},{58,2}}, + points={{48,-18},{52,-18},{52,-1},{58,-1}}, color={158,66,200}, thickness=1)); connect(O2_gas1.port_a, reaction1.substrates[2]) annotation (Line( - points={{48,18},{52,18},{52,-2},{58,-2}}, + points={{48,18},{52,18},{52,1},{58,1}}, color={158,66,200}, thickness=1)); connect(H2_gas1.solution, idealGas1.solution) annotation (Line(points={{32,-28}, @@ -1165,19 +1165,19 @@ extends Modelica.Icons.ExamplesPackage; equation //Michaelis-Menton: v=((E.q_out.conc + ES.q_out.conc)*k_cat)*S.concentration/(Km+S.concentration); connect(S.port_a, chemicalReaction.substrates[1]) annotation (Line( - points={{-72,-4},{-56,-4},{-56,2},{-42,2}}, + points={{-72,-4},{-56,-4},{-56,-1},{-42,-1}}, color={158,66,200}, thickness=1)); connect(E.port_a, chemicalReaction.substrates[2]) annotation (Line( - points={{10,48},{-52,48},{-52,-2},{-42,-2}}, + points={{10,48},{-52,48},{-52,1},{-42,1}}, color={158,66,200}, thickness=1)); connect(E.port_a, chemicalReaction1.products[2]) annotation (Line( - points={{10,48},{54,48},{54,-2},{44,-2}}, + points={{10,48},{54,48},{54,1},{44,1}}, color={158,66,200}, thickness=1)); connect(chemicalReaction1.products[1], P.port_a) annotation (Line( - points={{44,2},{58,2},{58,-2},{72,-2}}, + points={{44,-1},{58,-1},{58,-2},{72,-2}}, color={158,66,200}, thickness=1)); connect(E.solution, solution.solution) annotation (Line( @@ -6250,7 +6250,8 @@ extends Modelica.Icons.ExamplesPackage; use_mass_start=false, amountOfSubstance_start=0.1) annotation (Placement(transformation(extent={{280,-6},{260,14}}))); - inner DropOfCommons dropOfCommons(assertionLevel=AssertionLevel.warning) annotation (Placement(transformation(extent={{40,60},{60,80}}))); + inner DropOfCommons dropOfCommons(L=1e-8, + assertionLevel=AssertionLevel.warning) annotation (Placement(transformation(extent={{40,60},{60,80}}))); equation connect(A.solution, solution.solution) annotation (Line( points={{-48,-8},{-48,-92},{60,-92},{60,-98}}, @@ -6304,8 +6305,6 @@ extends Modelica.Icons.ExamplesPackage; useOutlet=true, use_mass_start=false, amountOfSubstance_start=0.1) annotation (Placement(transformation(extent={{-34,2},{-14,22}}))); - Chemical.Components.Reaction reaction(nS=2, nP=1) - annotation (Placement(transformation(extent={{4,-8},{24,12}}))); Boundaries.Substance B( useInlet=false, useOutlet=true, @@ -6331,6 +6330,11 @@ extends Modelica.Icons.ExamplesPackage; use_mass_start=false, amountOfSubstance_start=0.1) annotation (Placement(transformation(extent={{306,-8},{286,12}}))); + Processes.Reaction reaction( + TC=0.1, + nS=2, + nP=1) annotation (Placement(transformation(extent={{6,-10},{26,10}}))); + inner DropOfCommons dropOfCommons(L=1e-8) annotation (Placement(transformation(extent={{32,48},{52,68}}))); equation connect(A.solution, solution.solution) annotation (Line( points={{-30,2},{-30,-90},{60,-90},{60,-98}}, @@ -6356,14 +6360,379 @@ extends Modelica.Icons.ExamplesPackage; points={{224,12},{234,12},{234,3},{242,3}}, color={158,66,200}, thickness=1)); + connect(reaction.products[1], C.inlet) annotation (Line( + points={{26,0},{28,0},{28,2},{48,2}}, + color={158,66,200}, + thickness=0.5)); + connect(A.outlet, reaction.substrates[1]) annotation (Line( + points={{-14,12},{-4,12},{-4,-0.25},{6,-0.25}}, + color={158,66,200}, + thickness=0.5)); + connect(B.outlet, reaction.substrates[2]) annotation (Line( + points={{-14,-14},{-4,-14},{-4,0.25},{6,0.25}}, + color={158,66,200}, + thickness=0.5)); annotation ( Documentation(revisions="

2015-2018

Marek Matejak, Charles University, Prague, Czech Republic

", info="

Simple reaction demonstrating equilibria between substance A, B, and substance C, mixed in one solution. Observe the molar concentration (A.c) and molar fraction. Note, that molar fractions (A.x and B.x and C.x) are always summed to 1 for the whole solution.

"), - experiment(StopTime=0.0001, __Dymola_Algorithm="Dassl"), + experiment( + StopTime=4e-05, + Tolerance=1e-07, + __Dymola_Algorithm="Dassl"), Diagram(coordinateSystem(extent={{-100,-100},{340,100}})), Icon(coordinateSystem(extent={{-100,-100},{340,100}}))); end SimpleReaction2S; + + model EnzymeKinetics2 "Basic enzyme kinetics" + extends Modelica.Icons.Example; + + Chemical.Components.Solution solution + annotation (Placement(transformation(extent={{-100,-100},{100,100}}))); + + //The huge negative Gibbs energy of the product will make the second reaction almost irreversible (e.g. K=exp(50)) + Boundaries.Substance P( + useInlet=true, + useOutlet=false, + substanceData(DfG=-Modelica.Constants.R*298.15*50), + use_mass_start=false, + amountOfSubstance_start=1e-8) + annotation (Placement(transformation(extent={{72,-12},{92,8}}))); + Boundaries.Substance S(use_mass_start=false, amountOfSubstance_start=1) + annotation (Placement(transformation(extent={{-92,-14},{-72,6}}))); + + parameter Modelica.Units.SI.AmountOfSubstance tE=1e-6 + "Total amount of enzyme"; + parameter Real k_cat(unit="1/s", displayUnit="1/min")= 1 + "Forward rate of second reaction"; + constant Modelica.Units.SI.Concentration Km=0.1 + "Michaelis constant = substrate concentration at rate of half Vmax"; + + parameter Modelica.Units.SI.MolarFlowRate Vmax=1e-5*k_cat + "Maximal molar flow"; + + Boundaries.Substance ES( + useInlet=true, + substanceData(DfG=-Modelica.Constants.R*298.15*log(2/Km)), + use_mass_start=false, + amountOfSubstance_start=tE/2) + annotation (Placement(transformation(extent={{-12,-10},{8,10}}))); + Boundaries.Substance E( + useInlet=true, + useOutlet=true, use_mass_start=false, amountOfSubstance_start=tE/2) + annotation (Placement(transformation(extent={{10,38},{-10,58}}))); + Processes.Reaction chemicalReaction( + KC=Vmax/(2*Modelica.Constants.R*298.15*log(2)), + nP=1, + nS=2) + annotation (Placement(transformation(extent={{-42,-10},{-22,10}}))); + + Processes.Reaction chemicalReaction1( + KC=Vmax/(2*Modelica.Constants.R*298.15*(50 - log(2))), + nS=1, + nP=2) annotation (Placement(transformation(extent={{24,-10},{44,10}}))); + + Components.Substance liquidWater(substanceData= + Chemical.Substances.Water_liquid(), mass_start=1) + annotation (Placement(transformation(extent={{42,-80},{62,-60}}))); + Components.Solution solution1 + annotation (Placement(transformation(extent={{118,-100},{318,100}}))); + Components.Substance P1( + substanceData(DfG=-Modelica.Constants.R*298.15*50), + use_mass_start=false, + amountOfSubstance_start=1e-8) + annotation (Placement(transformation(extent={{310,-12},{290,8}}))); + Components.Substance S1(use_mass_start=false, amountOfSubstance_start=1) + annotation (Placement(transformation(extent={{126,-14},{146,6}}))); + Components.Substance ES1( + substanceData(DfG=-Modelica.Constants.R*298.15*log(2/Km)), + use_mass_start=false, + amountOfSubstance_start=tE/2) + annotation (Placement(transformation(extent={{206,-10},{226,10}}))); + Components.Substance E1(use_mass_start=false, amountOfSubstance_start=tE/2) + annotation (Placement(transformation(extent={{208,38},{228,58}}))); + Components.Reaction chemicalReaction2( + nS=2, + KC=Vmax/(2*Modelica.Constants.R*298.15*log(2)), + nP=1) + annotation (Placement(transformation(extent={{176,-10},{196,10}}))); + Components.Reaction chemicalReaction3( + nP=2, + KC=Vmax/(2*Modelica.Constants.R*298.15*(50 - log(2))), + nS=1) annotation (Placement(transformation(extent={{242,-10},{262,10}}))); + Components.Substance liquidWater1(substanceData=Chemical.Substances.Water_liquid(), mass_start=1) + annotation (Placement(transformation(extent={{260,-80},{280,-60}}))); + equation + //Michaelis-Menton: v=((E.q_out.conc + ES.q_out.conc)*k_cat)*S.concentration/(Km+S.concentration); + connect(E.solution, solution.solution) annotation (Line( + points={{6,38},{-8,38},{-8,-98},{60,-98}}, + color={127,127,0})); + connect(ES.solution, solution.solution) + annotation (Line(points={{-8,-10},{-8,-98},{60,-98}}, color={127,127,0})); + + connect(S.solution, solution.solution) annotation (Line( + points={{-88,-14},{-88,-56},{-8,-56},{-8,-98},{60,-98}}, + color={127,127,0})); + connect(P.solution, solution.solution) annotation (Line( + points={{76,-12},{76,-98},{60,-98}}, + color={127,127,0})); + connect(liquidWater.solution, solution.solution) annotation (Line(points={{ + 46,-80},{46,-98},{60,-98}}, color={127,127,0})); + connect(S1.port_a, chemicalReaction2.substrates[1]) + annotation (Line( + points={{146,-4},{154,-4},{154,-1},{176,-1}}, + color={158,66,200}, + thickness=1)); + connect(E1.port_a, chemicalReaction2.substrates[2]) + annotation (Line( + points={{228,48},{228,50},{160,50},{160,1},{176,1}}, + color={158,66,200}, + thickness=1)); + connect(E1.port_a, chemicalReaction3.products[2]) + annotation (Line( + points={{228,48},{228,50},{274,50},{274,1},{262,1}}, + color={158,66,200}, + thickness=1)); + connect(chemicalReaction3.products[1], P1.port_a) + annotation (Line( + points={{262,-1},{264,-1},{264,-2},{290,-2}}, + color={158,66,200}, + thickness=1)); + connect(E1.solution, solution1.solution) annotation (Line(points={{212,38},{212,106},{324,106},{324,-106},{278,-106},{278,-98}}, color={127,127,0})); + connect(ES1.solution, solution1.solution) annotation (Line(points={{210,-10},{210,-106},{278,-106},{278,-98}}, color={127,127,0})); + connect(S1.solution, solution1.solution) annotation (Line(points={{130,-14},{112,-14},{112,-106},{278,-106},{278,-98}}, color={127,127,0})); + connect(P1.solution, solution1.solution) annotation (Line(points={{306,-12},{324,-12},{324,-106},{278,-106},{278,-98}}, color={127,127,0})); + connect(liquidWater1.solution, solution1.solution) annotation (Line(points={{264,-80},{264,-106},{278,-106},{278,-98}}, color={127,127,0})); + connect(chemicalReaction2.products[1], ES1.port_a) annotation (Line(points={{196,0},{226,0}}, color={158,66,200})); + connect(ES1.port_a, chemicalReaction3.substrates[1]) annotation (Line(points={{226,0},{242,0}}, color={158,66,200})); + connect(S.outlet, chemicalReaction.substrates[1]) + annotation (Line( + points={{-72,-4},{-60,-4},{-60,-0.25},{-42,-0.25}}, + color={158,66,200}, + thickness=0.5)); + connect(E.outlet, chemicalReaction.substrates[2]) + annotation (Line( + points={{-10,48},{-56,48},{-56,0.25},{-42,0.25}}, + color={158,66,200}, + thickness=0.5)); + connect(chemicalReaction.products[1], ES.inlet) annotation (Line( + points={{-22,0},{-12,0}}, + color={158,66,200}, + thickness=0.5)); + connect(ES.outlet, chemicalReaction1.substrates[1]) annotation (Line( + points={{8,0},{24,0}}, + color={158,66,200}, + thickness=0.5)); + connect(chemicalReaction1.products[1], P.inlet) + annotation (Line( + points={{44,-0.25},{60,-0.25},{60,-2},{72,-2}}, + color={158,66,200}, + thickness=0.5)); + connect(chemicalReaction1.products[2], E.inlet) + annotation (Line( + points={{44,0.25},{58,0.25},{58,48},{10,48}}, + color={158,66,200}, + thickness=0.5)); + annotation ( Documentation(revisions=" +

2015-2018

+

Marek Matejak, Charles University, Prague, Czech Republic

+", info=" +

Be carefull, the assumption for Michaelis-Menton are very strong:

+

The substrate must be in sufficiently high concentration and the product must be in very low concentration to reach almost all enzyme in enzyme-substrate complex all time. ([S] >> Km) && ([P] << K2)

+


To recalculate the enzyme kinetics from Michaelis-Menton parameters Km, tE a k_cat is selected the same half-rate of the reaction defined as:

+

E = ES = tE/2 .. the amount of free enzyme is the same as the amount of enzyme-substrate complexes

+

S = Km .. the amount of substrate is Km

+

r = Vmax/2 = tE*k_cat / 2 .. the rate of reaction is the half of maximal rate

+


Conversions of molar concentration to mole fraction (MM is molar mass of the solvent in solution -> 55.508 kg/mol for water):

+

x(Km) = Km/MM

+

x(tE) = tE/MM

+

xS = S/MM = Km/MM

+


The new kinetics of the system defined as:

+

uS° = DfG(S) = 0

+

uE° = DfG(E) = 0

+

uES° = DfG(ES) = DfG(S) + DfG(E) - R*T*ln(2/x(Km))

+

from dissociation coeficient of the frist reaction 2/x(Km) = xSE/(xS*xE) = exp((uE° + uS° - uES°)/(RT))

+

uP° = DfG(P)

+


r = Vmax/2

+

r = -kC1 * (uES° - uE° - uS° + R*T*ln(xES/(xE*xS) ) = -kC1 * (-R*T*ln(2/x(Km)) + R*T*ln(xS) ) = kC1 * R * T * ln(2)

+

because xES=xE this time

+

r = -kC2 * (uP° + uE° - uES° + R*T*ln(xP*xE/xES) ) = -kC2 * (DfG(P) - uES° + R*T*ln(xP) ) = kC2 * (-DfG(P) - R * T * ln(2))

+

kC1 = (Vmax/2) / (R * T * ln(2))

+

kC2 = (Vmax/2) / ( -DfG(P) - R * T * ln(2) )

+


For example in case of C=AmountOfSolution/(Tau*ActivationPotential) we can rewrite C to ActivationPotential (Be carefull: this energy is not the same as in Arrhenius equation or in Transition State Theory):

+

ActivationPotential1 = AmountOfSolution/(Tau*(Vmax/2)) * R * T * ln(2)

+

ActivationPotential2 = AmountOfSolution/(Tau*(Vmax/2)) * ( -DfG(P) - R * T * ln(2) )

+


where

+

AmountOfSolution = MM = 55.508 (for water)

+

Tau = 1 s (just to be physical unit correct)

+

DfG(P) = -R*T*50 is Gibbs energy of formation of product (setting negative enough makes second reaction almost irreversible)

+

The maximum of the new enzyme kinetics

+

The enzymatic rate must have a maximum near of Vmax.

+

The new maximum is a litle higher: Vmax * (1 + 1/( -uP°/(R*T*ln(2)) - 1) ), for example if -uP°/RT = 50, the new maximum is around 1.014*Vmax, where Vmax is the maximum of Michaelis Menten.

+

The proof:

+

We want to sutisfied the following inequality:

+

-kC2 * (uP° + uE° - uES° + R*T*ln(xP*xE/xES) ) ?=<? Vmax * (1 + 1/( -uP°/(R*T*ln(2)) - 1) )

+


(Vmax/2) * (uP° + uE° - uES° + R*T*ln(xP*xE/xES) ) / ( - uP° - R * T * ln(2) ) ?=<? Vmax*(1 + R*T*ln(2) / ( -uP° - R*T*ln(2)) )

+

(uP° + R*T*ln(2/x(Km)) + R*T*ln(xP*xE/xES) ) ?=<? 2*( - uP° - R * T * ln(2) ) + 2*R*T*ln(2)

+

R*T*ln(xP*xE/xES) ?=<? - uP° - R*T*ln(2/x(Km))

+

xP*xE/xES ?=<? exp((- uP° - R*T*ln(2/x(Km))/(R*T))

+

The equality is the equation of the equilibrium: xP*xE/xES = exp((- uP° - uE° + uES° )/(R*T)) = exp((- uP° - R*T*ln(2/x(Km))/(R*T))

+

If the equilibrium of the reaction is reached only by forward rate then xP*xE/xES must be less than the dissociation constant.

+"), + experiment(StopTime=199000, __Dymola_Algorithm="Dassl"), + Diagram(coordinateSystem(extent={{-100,-100},{320,100}})), + Icon(coordinateSystem(extent={{-100,-100},{320,100}}))); + end EnzymeKinetics2; + + model EnzymeKinetics3 "Basic enzyme kinetics" + extends Modelica.Icons.Example; + + Chemical.Components.Solution solution + annotation (Placement(transformation(extent={{-100,-100},{100,100}}))); + + //The huge negative Gibbs energy of the product will make the second reaction almost irreversible (e.g. K=exp(50)) + Boundaries.Substance P( + useInlet=true, + useOutlet=false, + substanceData(DfG=-Modelica.Constants.R*298.15*50), + use_mass_start=false, + amountOfSubstance_start=1e-8) + annotation (Placement(transformation(extent={{72,-12},{92,8}}))); + Boundaries.Substance S(use_mass_start=false, amountOfSubstance_start=1) + annotation (Placement(transformation(extent={{-92,-14},{-72,6}}))); + + parameter Modelica.Units.SI.AmountOfSubstance tE=1e-6 + "Total amount of enzyme"; + parameter Real k_cat(unit="1/s", displayUnit="1/min")= 1 + "Forward rate of second reaction"; + constant Modelica.Units.SI.Concentration Km=0.1 + "Michaelis constant = substrate concentration at rate of half Vmax"; + + parameter Modelica.Units.SI.MolarFlowRate Vmax=1e-5*k_cat + "Maximal molar flow"; + + Boundaries.Substance ES( + useInlet=true, + substanceData(DfG=-Modelica.Constants.R*298.15*log(2/Km)), + use_mass_start=false, + amountOfSubstance_start=tE/2) + annotation (Placement(transformation(extent={{-12,-10},{8,10}}))); + Boundaries.Substance E( + useInlet=true, + useOutlet=true, use_mass_start=false, amountOfSubstance_start=tE/2) + annotation (Placement(transformation(extent={{10,38},{-10,58}}))); + Processes.Reaction chemicalReaction( + KC=Vmax/(2*Modelica.Constants.R*298.15*log(2)), + nP=1, + nS=2) + annotation (Placement(transformation(extent={{-42,-10},{-22,10}}))); + + Processes.Reaction chemicalReaction1( + KC=Vmax/(2*Modelica.Constants.R*298.15*(50 - log(2))), + nS=1, + nP=2) annotation (Placement(transformation(extent={{24,-10},{44,10}}))); + + Components.Substance liquidWater(substanceData= + Chemical.Substances.Water_liquid(), mass_start=1) + annotation (Placement(transformation(extent={{42,-80},{62,-60}}))); + inner DropOfCommons dropOfCommons(assertionLevel=AssertionLevel.warning) annotation (Placement(transformation(extent={{52,68},{72,88}}))); + equation + //Michaelis-Menton: v=((E.q_out.conc + ES.q_out.conc)*k_cat)*S.concentration/(Km+S.concentration); + connect(E.solution, solution.solution) annotation (Line( + points={{6,38},{-8,38},{-8,-98},{60,-98}}, + color={127,127,0})); + connect(ES.solution, solution.solution) + annotation (Line(points={{-8,-10},{-8,-98},{60,-98}}, color={127,127,0})); + + connect(S.solution, solution.solution) annotation (Line( + points={{-88,-14},{-88,-56},{-8,-56},{-8,-98},{60,-98}}, + color={127,127,0})); + connect(P.solution, solution.solution) annotation (Line( + points={{76,-12},{76,-98},{60,-98}}, + color={127,127,0})); + connect(liquidWater.solution, solution.solution) annotation (Line(points={{ + 46,-80},{46,-98},{60,-98}}, color={127,127,0})); + connect(S.outlet, chemicalReaction.substrates[1]) + annotation (Line( + points={{-72,-4},{-60,-4},{-60,-0.25},{-42,-0.25}}, + color={158,66,200}, + thickness=0.5)); + connect(E.outlet, chemicalReaction.substrates[2]) + annotation (Line( + points={{-10,48},{-56,48},{-56,0.25},{-42,0.25}}, + color={158,66,200}, + thickness=0.5)); + connect(chemicalReaction.products[1], ES.inlet) annotation (Line( + points={{-22,0},{-12,0}}, + color={158,66,200}, + thickness=0.5)); + connect(ES.outlet, chemicalReaction1.substrates[1]) annotation (Line( + points={{8,0},{24,0}}, + color={158,66,200}, + thickness=0.5)); + connect(chemicalReaction1.products[1], P.inlet) + annotation (Line( + points={{44,-0.25},{60,-0.25},{60,-2},{72,-2}}, + color={158,66,200}, + thickness=0.5)); + connect(chemicalReaction1.products[2], E.inlet) + annotation (Line( + points={{44,0.25},{58,0.25},{58,48},{10,48}}, + color={158,66,200}, + thickness=0.5)); + annotation ( Documentation(revisions=" +

2015-2018

+

Marek Matejak, Charles University, Prague, Czech Republic

+", info=" +

Be carefull, the assumption for Michaelis-Menton are very strong:

+

The substrate must be in sufficiently high concentration and the product must be in very low concentration to reach almost all enzyme in enzyme-substrate complex all time. ([S] >> Km) && ([P] << K2)

+


To recalculate the enzyme kinetics from Michaelis-Menton parameters Km, tE a k_cat is selected the same half-rate of the reaction defined as:

+

E = ES = tE/2 .. the amount of free enzyme is the same as the amount of enzyme-substrate complexes

+

S = Km .. the amount of substrate is Km

+

r = Vmax/2 = tE*k_cat / 2 .. the rate of reaction is the half of maximal rate

+


Conversions of molar concentration to mole fraction (MM is molar mass of the solvent in solution -> 55.508 kg/mol for water):

+

x(Km) = Km/MM

+

x(tE) = tE/MM

+

xS = S/MM = Km/MM

+


The new kinetics of the system defined as:

+

uS° = DfG(S) = 0

+

uE° = DfG(E) = 0

+

uES° = DfG(ES) = DfG(S) + DfG(E) - R*T*ln(2/x(Km))

+

from dissociation coeficient of the frist reaction 2/x(Km) = xSE/(xS*xE) = exp((uE° + uS° - uES°)/(RT))

+

uP° = DfG(P)

+


r = Vmax/2

+

r = -kC1 * (uES° - uE° - uS° + R*T*ln(xES/(xE*xS) ) = -kC1 * (-R*T*ln(2/x(Km)) + R*T*ln(xS) ) = kC1 * R * T * ln(2)

+

because xES=xE this time

+

r = -kC2 * (uP° + uE° - uES° + R*T*ln(xP*xE/xES) ) = -kC2 * (DfG(P) - uES° + R*T*ln(xP) ) = kC2 * (-DfG(P) - R * T * ln(2))

+

kC1 = (Vmax/2) / (R * T * ln(2))

+

kC2 = (Vmax/2) / ( -DfG(P) - R * T * ln(2) )

+


For example in case of C=AmountOfSolution/(Tau*ActivationPotential) we can rewrite C to ActivationPotential (Be carefull: this energy is not the same as in Arrhenius equation or in Transition State Theory):

+

ActivationPotential1 = AmountOfSolution/(Tau*(Vmax/2)) * R * T * ln(2)

+

ActivationPotential2 = AmountOfSolution/(Tau*(Vmax/2)) * ( -DfG(P) - R * T * ln(2) )

+


where

+

AmountOfSolution = MM = 55.508 (for water)

+

Tau = 1 s (just to be physical unit correct)

+

DfG(P) = -R*T*50 is Gibbs energy of formation of product (setting negative enough makes second reaction almost irreversible)

+

The maximum of the new enzyme kinetics

+

The enzymatic rate must have a maximum near of Vmax.

+

The new maximum is a litle higher: Vmax * (1 + 1/( -uP°/(R*T*ln(2)) - 1) ), for example if -uP°/RT = 50, the new maximum is around 1.014*Vmax, where Vmax is the maximum of Michaelis Menten.

+

The proof:

+

We want to sutisfied the following inequality:

+

-kC2 * (uP° + uE° - uES° + R*T*ln(xP*xE/xES) ) ?=<? Vmax * (1 + 1/( -uP°/(R*T*ln(2)) - 1) )

+


(Vmax/2) * (uP° + uE° - uES° + R*T*ln(xP*xE/xES) ) / ( - uP° - R * T * ln(2) ) ?=<? Vmax*(1 + R*T*ln(2) / ( -uP° - R*T*ln(2)) )

+

(uP° + R*T*ln(2/x(Km)) + R*T*ln(xP*xE/xES) ) ?=<? 2*( - uP° - R * T * ln(2) ) + 2*R*T*ln(2)

+

R*T*ln(xP*xE/xES) ?=<? - uP° - R*T*ln(2/x(Km))

+

xP*xE/xES ?=<? exp((- uP° - R*T*ln(2/x(Km))/(R*T))

+

The equality is the equation of the equilibrium: xP*xE/xES = exp((- uP° - uE° + uES° )/(R*T)) = exp((- uP° - R*T*ln(2/x(Km))/(R*T))

+

If the equilibrium of the reaction is reached only by forward rate then xP*xE/xES must be less than the dissociation constant.

+"), + experiment( + StopTime=199000, + Tolerance=1e-05, + __Dymola_Algorithm="Dassl"), + Diagram(coordinateSystem(extent={{-100,-100},{320,100}})), + Icon(coordinateSystem(extent={{-100,-100},{320,100}}))); + end EnzymeKinetics3; end Examples;