Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
70a6f39
Modified MatStreamSimulation.mo
SarmithaVD Jun 23, 2023
9828643
Merge pull request #1 from SarmithaVD/mat-stream-sim
SarmithaVD Jun 23, 2023
d434a14
renamed the parameter and removed the initialisation
SarmithaVD Jul 31, 2023
b572c5b
Uncommented two lines
SarmithaVD Aug 8, 2023
839d66d
Declared BC_r array variable
SarmithaVD Aug 8, 2023
f45eace
Declared BC_r as integer array
SarmithaVD Aug 8, 2023
5ba9543
Made non-array modification for array component possible
SarmithaVD Aug 8, 2023
6421dca
Declared parameters Nc and C
SarmithaVD Aug 9, 2023
47e133d
Declared the required real valued variables x_pc, T, P, Pdew
SarmithaVD Aug 9, 2023
28ec966
Declared the integer parameter Nr
SarmithaVD Aug 10, 2023
98cf075
Array element modification
SarmithaVD Dec 12, 2023
c3885b3
Modified subscripts of arrays
SarmithaVD Dec 12, 2023
76478dd
Modified subscripts of arrays
SarmithaVD Dec 12, 2023
279d7e4
Array element modification
SarmithaVD Dec 12, 2023
bb67df7
Declared variables
SarmithaVD Dec 12, 2023
4c79c87
Array element modification
SarmithaVD Dec 12, 2023
47e3831
ShortcutColumn model file commit
SarmithaVD Dec 12, 2023
b72dd94
Mixer model file commit
SarmithaVD Dec 12, 2023
87e39df
Declared variables
SarmithaVD Dec 12, 2023
62c33fe
Resolved type mismatch
SarmithaVD Dec 13, 2023
230135a
Flash model file commit
SarmithaVD Dec 13, 2023
3ff3256
Array element modification
SarmithaVD Dec 13, 2023
e2c5471
Declared variables
SarmithaVD Dec 13, 2023
19fdca2
Compressor model file commit
SarmithaVD Dec 13, 2023
430720a
Expander model file commit
SarmithaVD Dec 13, 2023
d7f6f79
Declared Nc variable
SarmithaVD Dec 13, 2023
10be6fc
Declared condenser variable
SarmithaVD Dec 13, 2023
0e6a0fa
Distillation model file commit
SarmithaVD Dec 13, 2023
7f8c2d4
Changed accessibility mode of the real parameter R
SarmithaVD Dec 13, 2023
7c342cb
Declared the variable Nc as parameter
SarmithaVD Dec 13, 2023
a492e00
Changed accessibility mode of the integer parameter Nc
SarmithaVD Dec 13, 2023
703aedf
Changed accessibility mode of the real variable Rate
SarmithaVD Dec 13, 2023
dabbf2e
Decalared the real variables Nc and Nr as parameters
SarmithaVD Dec 13, 2023
2824a25
Changed accessibility mode of the integer parameters Nc and Nr
SarmithaVD Dec 13, 2023
704f872
PFR model file commit
SarmithaVD Dec 13, 2023
c96f17a
Declared the variables Coef_cr, BC_r and Hr_r
SarmithaVD Dec 13, 2023
cac63af
Declared the parameters C and Nc
SarmithaVD Dec 13, 2023
8872f76
ConversionReactor model file commit
SarmithaVD Dec 13, 2023
c1e7cac
Declared AbsTray variable tray
SarmithaVD Dec 13, 2023
926ee94
Declared real array variables gmabubl_c[Nc], philiqbubl_c[Nc], gmadew…
SarmithaVD Dec 13, 2023
76f9a5e
Array element modification
SarmithaVD Dec 13, 2023
ab9ea17
Declared tray variable
SarmithaVD Dec 13, 2023
0ae3c3b
Absorption model file commit
SarmithaVD Dec 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Simulator/Examples/Absorption.mo
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ package Absorption "Example of Simulating an Absorption Column"
end AbsorptionSimulation;
annotation(
Documentation(info = "<html><head></head><body><div style=\"font-size: 12px;\">Following problem statement is simulated in this Absorption Column example:</div><div style=\"font-size: 12px;\"><br></div><div><div style=\"font-size: 12px;\"><div style=\"font-size: medium;\"><div><span style=\"font-size: 12px;\"><br></span></div><div><div style=\"font-size: 12px;\"><b><u>Problem Statement:</u></b></div><div style=\"font-size: 12px;\"><b><br></b></div><b style=\"font-size: 12px;\">Component System:</b><span style=\"font-size: 12px;\">&nbsp;Air, Water, Acetone</span><div><b style=\"font-size: 12px;\">Thermodynamics:</b><span style=\"font-size: 12px;\">&nbsp;Raoult's Law</span><div style=\"font-size: 12px;\"><br></div><div style=\"font-size: 12px;\"><b><u>Material Stream Information</u></b></div><div style=\"font-size: 12px;\"><br></div><div style=\"font-size: 12px;\"><div style=\"font-size: medium;\"><div style=\"font-size: 12px;\"><div><div><b>Feed Stream 1 (Solvent)</b></div><div><b>Molar Flow Rate:</b>&nbsp;30 mol/s</div><div><b>Mole Fraction (Water):</b>&nbsp;1</div><div><b>Pressure:</b>&nbsp;101325 Pa</div><div><b>Temperature:</b>&nbsp;325 K</div><div><br></div><div><div><b>Feed Stream 2 (Gas Mixture)</b></div><div><b>Molar Flow Rate:</b>&nbsp;30 mol/s</div><div><b>Mole Fraction (Air):</b>&nbsp;0.5</div><div><b>Mole Fraction (Acetone):</b>&nbsp;0.5</div><div><b>Pressure:</b>&nbsp;101325 Pa</div><div><b>Temperature:</b>&nbsp;335 K</div></div></div><div><br></div></div></div></div><div style=\"font-size: 12px;\"><br></div><span style=\"font-size: 12px;\">Simulate an absorption column with 10 stages where the solvent enters from the top and gas mixture enters from bottom to remove acetone from air.</span></div></div></div></div><hr><div><span style=\"font-size: 12px;\"><br></span></div><div><span style=\"font-size: 12px;\">This package is created to demnostrate the simualtion of an Absorption Column. Following models are created inside the package:</span></div><div><div style=\"font-size: 12px;\"><ol><li><a href=\"modelica://Simulator.Examples.Absorption.MS\">MS</a>&nbsp;(Non-executable model):&nbsp;created to extend the material stream along with the necessary thermodynamic package.</li><li><a href=\"modelica://Simulator.Examples.Absorption.Tray\">Tray</a>&nbsp;(Non-executable model):&nbsp;created to extend the tray along with the necessary thermodynamic package.</li><li><a href=\"modelica://Simulator.Examples.Absorption.AbsColumn\">AbsColumn</a>&nbsp;(Non-executable model):&nbsp;created to extend the Absorption Column along with the necessary thermodynamic package.</li><li><a href=\"modelica://Simulator.Examples.Absorption.AbsorptionSimulation\">AbsorptionSimulation</a>&nbsp;(Executable model):&nbsp;All the components are defined, material stream &amp; Absorption Column specifications are declared, model instances are connected to make the file executable.</li></ol></div></div></div></body></html>"));
end Absorption;
end Absorption;
2 changes: 1 addition & 1 deletion Simulator/Examples/CompositeMS.mo
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ package CompositeMS "Example of Simulating a Material Stream"
end MatStreamSimulation;
annotation(
Documentation(info = "<html><head></head><body><div style=\"font-size: 12px;\">Following problem statement is simulated in this&nbsp;<b>Material Stream</b>&nbsp;example</div><div style=\"font-size: 12px;\"><b><br></b></div><b style=\"font-size: 12px;\">Component System:</b><span style=\"font-size: 12px;\">&nbsp;Benzene, Toluene</span><div style=\"font-size: 12px;\"><b>Thermodynamics:</b>&nbsp;Raoult's Law</div><div style=\"font-size: 12px;\"><br></div><div style=\"font-size: 12px;\"><b><u>Material Stream Information</u></b></div><div style=\"font-size: 12px;\"><br></div><div style=\"font-size: 12px;\"><b>Molar Flow Rate:</b>&nbsp;100 mol/s</div><div style=\"font-size: 12px;\"><b>Mole Fraction (Benzene):</b>&nbsp;0.5</div><div style=\"font-size: 12px;\"><b>Mole Fraction (Toluene):</b>&nbsp;0.5</div><div style=\"font-size: 12px;\"><b>Pressure:</b>&nbsp;101325 Pa</div><div style=\"font-size: 12px;\"><b>Temperature:</b>&nbsp;368 K</div><div style=\"font-size: 12px;\"><br></div><span style=\"font-size: 12px;\">Simulate a material stream to compute all its thermo-physical properties at conditions mentioned above.</span><hr><div><span style=\"font-size: 12px;\"><br></span></div><div><span style=\"font-size: 12px;\">This package is created to demnostrate the simualtion of a Material Stream. Following models are created inside the package:</span></div><div><div style=\"font-size: 12px;\"><ol><li><a href=\"modelica://Simulator.Examples.CompositeMS.MS\">MS</a>&nbsp;(Non-executable model):&nbsp;created to extend the material stream along with the necessary thermodynamic package</li><li><a href=\"modelica://Simulator.Examples.CompositeMS.MatStreamSimulation\">MatStreamSimulation</a>&nbsp;(Executable model): All the components are defined, material stream specifications are declared to make the file executable.</li></ol></div></div></body></html>"));
end CompositeMS;
end CompositeMS;
2 changes: 1 addition & 1 deletion Simulator/Examples/Compressor.mo
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ package Compressor "Example of Simulating an Adiabatic Compressor"
end CompressorSimulation;
annotation(
Documentation(info = "<html><head></head><body><div style=\"font-size: 12px;\">Following problem statement is simulated in this&nbsp;<b>Adiabatic Compressor</b>&nbsp;example</div><div style=\"font-size: 12px;\"><b><br></b></div><b style=\"font-size: 12px;\">Component System:</b><span style=\"font-size: 12px;\">&nbsp;Benzene, Toulene</span><div style=\"font-size: 12px;\"><b>Thermodynamics:</b>&nbsp;Raoult's Law</div><div style=\"font-size: 12px;\"><br></div><div style=\"font-size: 12px;\"><b><u>Material Stream Information</u></b></div><div style=\"font-size: 12px;\"><br></div><div style=\"font-size: 12px;\"><b>Molar Flow Rate:</b> 100 mol/s</div><div style=\"font-size: 12px;\"><b>Mole Fraction (Benzene):</b>&nbsp;0.5</div><div style=\"font-size: 12px;\"><b>Mole Fraction (Toluene):</b>&nbsp;0.5</div><div style=\"font-size: 12px;\"><b>Pressure:</b>&nbsp;202650 Pa</div><div style=\"font-size: 12px;\"><b>Temperature:</b>&nbsp;372 K</div><div style=\"font-size: 12px;\"><br></div><span style=\"font-size: 12px;\">Simulate an adiabatic compressor to reduce the pressure of a vapor material stream such that the pressure increase is 10000 Pa. Assume the compressor to be operated at efficiency of 75%.</span><hr><div><span style=\"font-size: 12px;\"><br></span></div><div><span style=\"font-size: 12px;\">This package is created to demnostrate the simualtion of an Adiabatic Compressor. Following models are created inside the package:</span></div><div><div style=\"font-size: 12px;\"><ol><li><a href=\"modelica://Simulator.Examples.Compressor.MS\">MS</a>&nbsp;(Non-executable model):&nbsp;created to extend the material stream along with the necessary thermodynamic package</li><li><a href=\"modelica://Simulator.Examples.Compressor.AdiabComp\">AdiabComp</a>&nbsp;(Non-executable model):&nbsp;created to extend the adiabatic compressor along with the necessary thermodynamic package.</li><li><a href=\"modelica://Simulator.Examples.Compressor.CompressorSimulation\">CompressorSimulation</a>&nbsp;(Executable model): All the components are defined, material stream &amp; compressor specifications are declared, model instances are connected to make the file executable.</li></ol></div></div></body></html>"));
end Compressor;
end Compressor;
11 changes: 5 additions & 6 deletions Simulator/Examples/ConversionReactor.mo
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ package ConversionReactor "Example of Simulating a Conversion Reactor"
annotation(
Documentation(info = "<html><head></head><body><span style=\"font-size: 12px;\">This is a non-executable model is created inside the package CR to extend the&nbsp;</span><a href=\"modelica://Simulator.UnitOperations.ConversionReactor\">ConversionReactor</a><span style=\"font-size: 12px;\">&nbsp;model along with the necessary reaction from Reaction Manager which is</span><span style=\"font-size: 12px;\">&nbsp;</span><a href=\"modelica://Simulator.Files.Models.ReactionManager.ConversionReaction\">ConversionReaction</a>&nbsp;in this case<span style=\"font-size: 12px;\">.</span><div><span style=\"font-size: 12px;\"><br></span></div><div>It will be instantiated in the&nbsp;<a href=\"modelica://Simulator.Examples.CR.ConvReactSimulation\">ConvReactSimulation</a>&nbsp;model to create the required number of instances of the adiabatic expander model.</div></body></html>"));
end ConvReactor;
annotation(
Documentation(info = "<html><head></head><body><div style=\"font-size: 12px;\">Following problem statement is simulated in this&nbsp;<b>Conversion Reactor</b>&nbsp;example</div><div style=\"font-size: 12px;\"><b><br></b></div><b style=\"font-size: 12px;\">Component System:</b><span style=\"font-size: 12px;\">&nbsp;Ethyl Acetate, Water, Acetic Acid, Ethanol</span><div style=\"font-size: 12px;\"><b>Thermodynamics:</b>&nbsp;NRTL</div><div style=\"font-size: 12px;\"><br></div><div style=\"font-size: 12px;\"><b><u>Material Stream Information</u></b></div><div style=\"font-size: 12px;\"><br></div><div style=\"font-size: 12px;\"><b>Molar Flow Rate:</b>&nbsp;100 mol/s</div><div style=\"font-size: 12px;\"><b>Mole Fraction (Ethyl Acetate):</b>&nbsp;0</div><div style=\"font-size: 12px;\"><b>Mole Fraction (Water):</b>&nbsp;0</div><div style=\"font-size: 12px;\"><b>Mole Fraction (Acetic Acid):</b>&nbsp;0.4</div><div style=\"font-size: 12px;\"><b>Mole Fraction (Ethanol):</b>&nbsp;0.6</div><div style=\"font-size: 12px;\"><b>Pressure:</b>&nbsp;101325 Pa</div><div style=\"font-size: 12px;\"><b>Temperature:</b>&nbsp;300 K</div><div style=\"font-size: 12px;\"><br></div><span style=\"font-size: 12px;\">Simulate a conversion reactor where Acetic Acid reacts with Ethanol to form Ethyl Acetate and Water. The conversion of acetic acid is 60%. Assume the reactor to be operated isothermally.</span><hr><div><span style=\"font-size: 12px;\"><br></span></div><div><span style=\"font-size: 12px;\">This package is created to demnostrate the simualtion of a Conversion Reactor. Following models are created inside the package:</span></div><div><div style=\"font-size: 12px;\"><ol><li><a href=\"modelica://Simulator.Examples.CR.MS\">MS</a>&nbsp;(Non-executable model):&nbsp;created to extend the material stream along with the necessary thermodynamic package.</li><li><a href=\"modelica://Simulator.Examples.CR.ConvReactor\">ConvReactor</a>&nbsp;(Non-executable model):&nbsp;created to extend the conversion reactor along with the reaction manager.</li><li><a href=\"modelica://Simulator.Examples.CR.ConvReactSimulation\">ConvReactSimulation</a>&nbsp;(Executable model): All the components are defined, material stream &amp; conversion reactor specifications are declared, model instances are connected to make the file executable.</li></ol></div></div></body></html>"));


model ConvReactSimulation "Calculation of mole flows at outlet from given reaction conversion during production of Ethyl acetate by reacting Ethanol and Acetic Acid in a Conversion Reactor"
extends Modelica.Icons.Example;
Expand Down Expand Up @@ -52,8 +49,10 @@ package ConversionReactor "Example of Simulating a Conversion Reactor"
S1.T = 300;
S1.x_pc[1, :] = {0, 0, 0.4, 0.6};
S1.F_p[1] = 100;
annotation(
annotation(
Documentation(info = "<html><head></head><body><span style=\"font-size: 12px;\">This is an executable model to simualate the CR example where all the components are defined, material stream, conversion reactor &amp; conversion reaction specifications are declared, model instances are connected</span><span style=\"font-size: 12px;\">.</span><div><span style=\"font-size: 12px;\"><br></span></div><div><div style=\"font-size: 12px;\"><b>Material Stream Information</b></div><div style=\"font-size: 12px;\"><br></div><div style=\"font-size: 12px;\"><div><b>Molar Flow Rate:</b>&nbsp;100 mol/s</div><div><b>Mole Fraction (Ethyl Acetate):</b>&nbsp;0</div><div><b>Mole Fraction (Water):</b>&nbsp;0</div><div><b>Mole Fraction (Acetic Acid):</b>&nbsp;0.4</div><div><b>Mole Fraction (Ethanol):</b>&nbsp;0.6</div><div><b>Pressure:</b>&nbsp;101325 Pa</div><div><b>Temperature:</b>&nbsp;300 K</div></div><div style=\"font-size: 12px;\"><br></div><div style=\"font-size: 12px;\"><b>Reaction</b></div><div style=\"font-size: 12px;\">Acetic Acid + Ethanol ----&gt; Ethyl Acetate + Water</div><div style=\"font-size: 12px;\"><br></div><span style=\"font-size: 12px;\"><b>Conversion Reactor Specification: </b>Conversion of Acetic Acid: 30%</span></div><div><span style=\"font-size: 12px;\"><span class=\"Apple-tab-span\" style=\"white-space: pre;\"> </span>&nbsp;<span class=\"Apple-tab-span\" style=\"white-space: pre;\"> </span>&nbsp;<span class=\"Apple-tab-span\" style=\"white-space:pre\"> </span>&nbsp; &nbsp; &nbsp;Operation Mode: isothermal</span></div></body></html>"));
end ConvReactSimulation;
end ConvReactSimulation;
annotation(
Documentation(info = "<html><head></head><body><div style=\"font-size: 12px;\">Following problem statement is simulated in this&nbsp;<b>Conversion Reactor</b>&nbsp;example</div><div style=\"font-size: 12px;\"><b><br></b></div><b style=\"font-size: 12px;\">Component System:</b><span style=\"font-size: 12px;\">&nbsp;Ethyl Acetate, Water, Acetic Acid, Ethanol</span><div style=\"font-size: 12px;\"><b>Thermodynamics:</b>&nbsp;NRTL</div><div style=\"font-size: 12px;\"><br></div><div style=\"font-size: 12px;\"><b><u>Material Stream Information</u></b></div><div style=\"font-size: 12px;\"><br></div><div style=\"font-size: 12px;\"><b>Molar Flow Rate:</b>&nbsp;100 mol/s</div><div style=\"font-size: 12px;\"><b>Mole Fraction (Ethyl Acetate):</b>&nbsp;0</div><div style=\"font-size: 12px;\"><b>Mole Fraction (Water):</b>&nbsp;0</div><div style=\"font-size: 12px;\"><b>Mole Fraction (Acetic Acid):</b>&nbsp;0.4</div><div style=\"font-size: 12px;\"><b>Mole Fraction (Ethanol):</b>&nbsp;0.6</div><div style=\"font-size: 12px;\"><b>Pressure:</b>&nbsp;101325 Pa</div><div style=\"font-size: 12px;\"><b>Temperature:</b>&nbsp;300 K</div><div style=\"font-size: 12px;\"><br></div><span style=\"font-size: 12px;\">Simulate a conversion reactor where Acetic Acid reacts with Ethanol to form Ethyl Acetate and Water. The conversion of acetic acid is 60%. Assume the reactor to be operated isothermally.</span><hr><div><span style=\"font-size: 12px;\"><br></span></div><div><span style=\"font-size: 12px;\">This package is created to demnostrate the simualtion of a Conversion Reactor. Following models are created inside the package:</span></div><div><div style=\"font-size: 12px;\"><ol><li><a href=\"modelica://Simulator.Examples.CR.MS\">MS</a>&nbsp;(Non-executable model):&nbsp;created to extend the material stream along with the necessary thermodynamic package.</li><li><a href=\"modelica://Simulator.Examples.CR.ConvReactor\">ConvReactor</a>&nbsp;(Non-executable model):&nbsp;created to extend the conversion reactor along with the reaction manager.</li><li><a href=\"modelica://Simulator.Examples.CR.ConvReactSimulation\">ConvReactSimulation</a>&nbsp;(Executable model): All the components are defined, material stream &amp; conversion reactor specifications are declared, model instances are connected to make the file executable.</li></ol></div></div></body></html>"));

end ConversionReactor;
end ConversionReactor;
Loading