diff options
author | bnewbold <bnewbold@robocracy.org> | 2016-12-18 23:44:18 -0800 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2016-12-18 23:44:18 -0800 |
commit | 4451df9a9f33bcd81ab9b4ddd085c4b57d27bc29 (patch) | |
tree | c8a60bd419f3ce873ff377227b01ad44c2258d76 /modelica-parser-lalrpop/examples | |
parent | 25ec87c63a5ba79846e147e3d153bf8d884a664e (diff) | |
download | modelthing-4451df9a9f33bcd81ab9b4ddd085c4b57d27bc29.tar.gz modelthing-4451df9a9f33bcd81ab9b4ddd085c4b57d27bc29.zip |
parser: more features
Diffstat (limited to 'modelica-parser-lalrpop/examples')
-rw-r--r-- | modelica-parser-lalrpop/examples/modelica_models/heat_tank.mo | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/modelica-parser-lalrpop/examples/modelica_models/heat_tank.mo b/modelica-parser-lalrpop/examples/modelica_models/heat_tank.mo index dde1ae0..320c3f5 100644 --- a/modelica-parser-lalrpop/examples/modelica_models/heat_tank.mo +++ b/modelica-parser-lalrpop/examples/modelica_models/heat_tank.mo @@ -1,17 +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; + parameter Real 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; + 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; |