summaryrefslogtreecommitdiff
path: root/src/main/Simulator/Simulator/Examples/PFR.mo
diff options
context:
space:
mode:
authorpravindalve2023-05-30 04:20:14 +0530
committerGitHub2023-05-30 04:20:14 +0530
commitcbdd7ca21f1f673a3a739065098f7cc6c9c4b881 (patch)
tree595e888c38f00a314e751096b6bf636a544a5efe /src/main/Simulator/Simulator/Examples/PFR.mo
parent7740d1ca0c2e6bf34900460b0c58fa4d528577fb (diff)
parent280c6aa89a15331fb76b7014957953dc72af6093 (diff)
downloadChemical-Simulator-GUI-cbdd7ca21f1f673a3a739065098f7cc6c9c4b881.tar.gz
Chemical-Simulator-GUI-cbdd7ca21f1f673a3a739065098f7cc6c9c4b881.tar.bz2
Chemical-Simulator-GUI-cbdd7ca21f1f673a3a739065098f7cc6c9c4b881.zip
Merge pull request #63 from brenda-br/Fix-35HEADmaster
Restructure Project and Deployment
Diffstat (limited to 'src/main/Simulator/Simulator/Examples/PFR.mo')
-rw-r--r--src/main/Simulator/Simulator/Examples/PFR.mo52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/main/Simulator/Simulator/Examples/PFR.mo b/src/main/Simulator/Simulator/Examples/PFR.mo
new file mode 100644
index 0000000..b89f5f4
--- /dev/null
+++ b/src/main/Simulator/Simulator/Examples/PFR.mo
@@ -0,0 +1,52 @@
+within Simulator.Examples;
+
+package PFR
+ extends Modelica.Icons.ExamplesPackage;
+ model MS
+ extends Simulator.Streams.MaterialStream;
+ extends Simulator.Files.ThermodynamicPackages.RaoultsLaw;
+ end MS;
+
+ model PFR_Test_II
+ extends Modelica.Icons.Example;
+ //*****Advicable to Select the First Component as the Base Component*****\\
+ //========================================================================
+ //Header Files and Packages
+ import data = Simulator.Files.ChemsepDatabase;
+ parameter data.Ethyleneoxide eth;
+ parameter data.Ethyleneglycol eg;
+ parameter data.Water wat;
+ parameter Integer Nc = 3;
+ parameter data.GeneralProperties C[Nc] = {eth, wat, eg};
+
+ //========================================================================
+ //Instantiation of Streams and Blocks
+ Simulator.Examples.PFR.MS S1(Nc = Nc, C = C) annotation(
+ Placement(visible = true, transformation(origin = {-70, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
+ Simulator.Examples.PFR.MS S2(Nc = Nc, C = C) annotation(
+ Placement(visible = true, transformation(origin = {90, 0}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
+ Simulator.UnitOperations.PFR.PFR B1(C = {eth, wat, eg}, Mode = "Isothermal",Nc = 3, Nr = 1, Pdel = 90.56, Phase = "Mixture", Tdef = 360,Basis="Molar Concentration") annotation(
+ Placement(visible = true, transformation(origin = { 3, -1}, extent = {{-33, -33}, {33, 33}}, rotation = 0)));
+ Simulator.Streams.EnergyStream Energy annotation(
+ Placement(visible = true, transformation(origin = {-14, -54}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
+
+ equation
+
+ //========================================================================
+ //Connections
+ connect(Energy.Out, B1.En) annotation(
+ Line(points = {{-4, -54}, {2, -54}, {2, 0}, {4, 0}}, color = {255, 0, 0}));
+ connect(B1.Out, S2.In) annotation(
+ Line(points = {{36, 0}, {80, 0}, {80, 0}, {80, 0}}, color = {0, 70, 70}));
+ connect(S1.Out, B1.In) annotation(
+ Line(points = {{-60, 0}, {-30, 0}, {-30, 0}, {-30, 0}}, color = {0, 70, 70}));
+
+ //========================================================================
+ //Inputs and Specifications
+ S1.x_pc[1, :] = {0.2, 0.8, 0};
+ S1.P = 100000;
+ S1.T = 360;
+ S1.F_p[1] = 100;
+ B1.X_r[1] =0.0991;
+ end PFR_Test_II;
+end PFR;