diff options
author | bnewbold <bnewbold@robocracy.org> | 2016-12-17 19:33:11 -0800 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2016-12-17 19:33:11 -0800 |
commit | 2e634496a6f362017d8f5f643d4ad30a3507dff9 (patch) | |
tree | f6500ad5f05082a062794f90e2afd1998bb33ec1 /modelica-parser-lalrpop/examples/modelica_models/heat_tank.mo | |
parent | 9f82aceb9fbdb42f332d68f4a423123bd0788b2c (diff) | |
download | modelthing-2e634496a6f362017d8f5f643d4ad30a3507dff9.tar.gz modelthing-2e634496a6f362017d8f5f643d4ad30a3507dff9.zip |
update/expand parser examples
Diffstat (limited to 'modelica-parser-lalrpop/examples/modelica_models/heat_tank.mo')
-rw-r--r-- | modelica-parser-lalrpop/examples/modelica_models/heat_tank.mo | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/modelica-parser-lalrpop/examples/modelica_models/heat_tank.mo b/modelica-parser-lalrpop/examples/modelica_models/heat_tank.mo new file mode 100644 index 0000000..dde1ae0 --- /dev/null +++ b/modelica-parser-lalrpop/examples/modelica_models/heat_tank.mo @@ -0,0 +1,17 @@ +model HeatTankT + parameter Area=1; + connector TankStream + Real pressure; + flow Real volumeFlowRate; + Real temp; + end TankStream; + TankStream Inlet, Outlet; + Real level; + Real temp; +equation + Area*der(level) = Inlet.volumeFlowRate + Outlet.volumeFlowRate; + Outlet.pressure = Inlet.pressure; +Area*level*der(temp) = Inlet.volumeFlowRate*Inlet.temp + + Outlet.volumeFlowRate*Outlet.temp; +Outlet.temp = temp; +end HeatTankT; |