Extending Sys ML for Integration with Solverbased Simulation
Extending Sys. ML for Integration with Solver-based Simulation Tools Sys. ML/Modelica Team Discussion 1
Next Steps § Alternative extensions and transformations to simulators. – Conrad had side discussion with Nicolas. § Signal processing / directed flow example. § Modeling tool testing (No. Magic, etc). § Sys. ML/Modelica profile – Based on the simulator-independent profile? – Populated from this profile? § Other aspects of Sys. ML useful in simulation – State machines, etc. § Use cases? How much of the simulation languages to include? § RFC? Into Sys. ML or separately. – Spec should cover generation to simulators. § Simulator-independent libraries. – Generate to use simulator-specific libraries. 2 § Other languages: VHDL-AMS (similar to Modelica).
Other comments / questions § Separation of descriptive and analysis model. – Not necessarily one-to-one from descriptive to analysis. § Time modeling – Physical vs clocks vs simulation. – Generation from time parameters. § Type system differences – See Nicolas messages on subtyping. 3
Alternative Extensions 4
Sim. Vars on Flow Prop Types? «block» Electron «block» Some. Port. Type flow properties inout electricity : Electron inout heat : Heat. Energy. Q inout fluid : Water. Molecule i = 43 sim variables «is. Conserved» i : Current v : Voltage «block» Heat. Energy. Q sim variables «is. Conserved» hq : Heat. Flow. Rate t : Temperature «block» Water. Molecule sim variables «is. Conserved» fq : Volume. Flow. Rate p : Pressure § Do individual electrons or molecules of water (items) have flow rates and potentials to flow independent of their ports? 5
Sim. Vars on Port Types? «block» Some. Port. Type flow properties inout electricity : Charge inout heat : Heat. Energy inout fluid : Water sim variables «is. Conserved, refer. To=electricity» i : Current «refer. To=electricity» v : Voltage «is. Conserved, refer. To=heat» » hq : Heat. Flow. Rate «refer. To=heat» t : Temperature «is. Conserved, refer. To=fluid» fq : Volume. Flow. Rate «refer. To=fluid» p : Pressure Sys. ML+ connector EF flow Current i; Voltage v; flow Heat. Flow. Rate hq; Temperature t; flow Volume. Flow. Rate fq; Pressure p; end EF; Modelica § Sim. Variables for all flow properties on the port type. 6
Sim. Vars on Port Types? § Instances of port types are structural elements of as-built systems. – They are not flowing items. «block» Gas. Intake «block» Car ports gas. Intake : Gas. Intake value properties diameter : cm temp : Celsius flow properties in fuel : Gas sim variables «is. Conserved, refer. To=fuel» fq : Volume. Flow. Rate «refer. To=fuel» p : Pressure «is. Conserved, refer. To=fuel» hq : Heat. Flow. Rate «refer. To=fuel» t : Temperature Structural elements don’t have flow rates 7 and potentials to flow.
Sim. Vars on Sim. Block § Instances of Sim. Blocks are the flows themselves (not the ports instances or things flowing) «block» Gas. Intake «block» Car ports gas. Intake : Gas. Intake «sim. Block» EHF value properties diameter : cm temp : Celsius flow properties in fuel : Gas sim variables «is. Conserved» fq : Volume. Flow. Rate p : Pressure «is. Conserved» hq : Heat. Flow. Rate t : Temperature sim properties «refer. To=fuel» fsb : EHF Sim. Block instances have flow rates and 8 potentials to flow.
Alternative Transformations 9
Sim. Vars Generated By Sim. Block connector EF flow Current i; Voltage v; end EF; «block» Some. Port. Type flow properties inout electricity : Charge inout heat : Heat. Energy inout fluid : Water connector HF flow Heat. Flow. Rate hq; Temperature t; end HF; sim properties «refer. To=electricity» var : Electricity. Flow «refer. To=heat» var : Heat. Flow «refer. To=fluid» var : Fluid. Flow «sim. Block» Fluid. Flow sim variables «is. Conserved» fq : Volume. Flow. Rate p : Pressure «sim. Block» Heat. Flow sim variables «is. Conserved» hq : Heat. Flow. Rate t : Temperature Sys. ML+ «sim. Block» Electricity. Flow sim variables «is. Conserved» i : Current v : Voltage connector FF flow Volume. Flow. Rate fq; Pressure p; end HF; Modelica § Sim. Variables generated to separate Modelica connectors. 10
Sim. Vars Generated Together «block» Some. Port. Type flow properties inout electricity : Charge inout heat : Heat. Energy inout fluid : Water sim properties «refer. To=electricity» var : Electricity. Flow «refer. To=heat» var : Heat. Flow «refer. To=fluid» var : Fluid. Flow «sim. Block» Fluid. Flow sim variables «is. Conserved» fq : Volume. Flow. Rate p : Pressure «sim. Block» Heat. Flow sim variables «is. Conserved» hq : Heat. Flow. Rate t : Temperature «sim. Block» Electricity. Flow sim variables «is. Conserved» i : Current v : Voltage connector EHFF flow Current i; Voltage v; flow Heat. Flow. Rate hq; Temperature t; flow Volume. Flow. Rate fq; Pressure p; end EHFF; Modelica Sys. ML+ § Could generate Sim. Variables to one Modelica connector if lines are not needed to separate 11 connectors.
Port Type Name => Connector Name «block» Some. Port. Type flow properties inout electricity : Charge inout heat : Heat. Energy inout fluid : Water sim properties «refer. To=electricity» var : Electricity. Flow «refer. To=heat» var : Heat. Flow «refer. To=fluid» var : Fluid. Flow «sim. Block» Fluid. Flow sim variables «is. Conserved» fq : Volume. Flow. Rate p : Pressure «sim. Block» Heat. Flow sim variables «is. Conserved» hq : Heat. Flow. Rate t : Temperature «sim. Block» Electricity. Flow sim variables «is. Conserved» i : Current v : Voltage connector Some. Port. Type flow Current i; Voltage v; flow Heat. Flow. Rate hq; Temperature t; flow Volume. Flow. Rate fq; Pressure p; end Some. Port. Type; Modelica Sys. ML+ § Generate connector name from port type name. § Does not mean instances of Sy. ML port types have 12 flow rates or potentials to flow.
Nested Connectors are Syntax Only connector EF flow Current i; Voltage v; connector EHFF end EF; flow Current i; connector HF Voltage v; flow Heat. Flow. Rate hq; Temperature t; end HF; flow Volume. Flow. Rate fq; connector FF Pressure p; flow Volume. Flow. Rate fq; end EHFF; Pressure p; end HF; connector EHFF ef : EF hf : HF ff: FF Modelica end EHFF; = § Simulation is the same with and without nested connectors. 13
Sys. ML Port => Compound Connector «block» Some. Port. Type flow properties inout electricity : Charge inout heat : Heat. Energy inout fluid : Water sim properties «refer. To=electricity» var : Electricity. Flow «refer. To=heat» var : Heat. Flow «refer. To=fluid» var : Fluid. Flow «sim. Block» Fluid. Flow sim variables «is. Conserved» fq : Volume. Flow. Rate p : Pressure «sim. Block» Heat. Flow sim variables «is. Conserved» hq : Heat. Flow. Rate t : Temperature Sys. ML+ «sim. Block» Electricity. Flow sim variables «is. Conserved» i : Current v : Voltage connector EF flow Current i; Voltage v; end EF; connector HF flow Heat. Flow. Rate hq; Temperature t; end HF; connector FF flow Volume. Flow. Rate fq; Pressure p; end HF; connector Some. Port. Type ef : EF hf : HF ff: FF end Some. Port. Type; Modelica § Generating port type as connector with 14 nested connectors.
Sys. ML Port => Simple Connector «block» Some. Port. Type flow properties inout electricity : Charge inout heat : Heat. Energy inout fluid : Water sim properties «refer. To=electricity» var : Electricity. Flow «refer. To=heat» var : Heat. Flow «refer. To=fluid» var : Fluid. Flow «sim. Block» Fluid. Flow sim variables «is. Conserved» fq : Volume. Flow. Rate p : Pressure «sim. Block» Heat. Flow sim variables «is. Conserved» hq : Heat. Flow. Rate t : Temperature «sim. Block» Electricity. Flow sim variables «is. Conserved» i : Current v : Voltage connector Some. Port. Type flow Current i; Voltage v; flow Heat. Flow. Rate hq; Temperature t; flow Volume. Flow. Rate fq; Pressure p; end Some. Port. Type; Modelica Sys. ML+ § Generating port type as connector without nested connectors. 15 § Simulation is the same as previous slide.
- Slides: 15