Commit 750fab49 authored by Greenwood, Scott's avatar Greenwood, Scott
Browse files

changes updated to ExaDigit_AutoCSM template

parent d246a8af
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -5,6 +5,8 @@ partial model PartialControls
        transformation(extent={{50,-100},{70,-80}})), choicesAllMatching=true);
  replaceable PartialControlBus controlBus annotation (Placement(transformation(
          extent={{-20,-120},{20,-80}})), choicesAllMatching=true);
  replaceable parameter PartialStructure structure
    annotation (Placement(transformation(extent={{-70,-100},{-50,-80}})));
  annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
        coordinateSystem(preserveAspectRatio=false, extent={{-180,-100},{180,
            100}})));
+10 −11
Original line number Diff line number Diff line
@@ -2,25 +2,24 @@ within ExaDigiT_AutoCSM.BaseClasses.Systems;
partial model PartialModel
  extends Icons.Model;

  replaceable PartialSummary summary annotation (Placement(transformation(
          extent={{-70,120},{-50,140}})), Dialog(group="External", enable=false));
  replaceable parameter PartialData data annotation (
    Placement(transformation(extent={{50,120},{70,140}})),
    choicesAllMatching=true,
    Dialog(group="Internal"));
  replaceable PartialControlBus controlBus annotation (
    Placement(transformation(extent={{-10,90},{10,110}}), iconTransformation(
          extent={{-10,90},{10,110}})),
    choicesAllMatching=true,
    Dialog(group="Internal"));
  replaceable PartialSummary summary annotation (
    Placement(transformation(extent={{-70,120},{-50,140}})),
    Dialog(group="External", enable=false));
  replaceable parameter PartialData data annotation (
    Placement(transformation(extent={{50,120},{70,140}})),
    choicesAllMatching=true,
    Dialog(group="Internal"));
  replaceable PartialControls controls constrainedby PartialControls
    annotation (
  replaceable parameter PartialStructure structure
    annotation (Placement(transformation(extent={{-110,120},{-90,140}})));
  replaceable PartialControls controls constrainedby PartialControls annotation (
    Placement(transformation(extent={{10,120},{30,140}})),
    choicesAllMatching=true,
    Dialog(group="Internal"));
  replaceable Systems.PartialSources sources constrainedby PartialSources
    annotation (
  replaceable PartialSources sources constrainedby PartialSources annotation (
    Placement(transformation(extent={{-30,120},{-10,140}})),
    choicesAllMatching=true,
    Dialog(group="External", enable=false));
+5 −4
Original line number Diff line number Diff line
within ExaDigiT_AutoCSM.BaseClasses.Systems;
partial model PartialSources
  extends Icons.Source;
  replaceable parameter PartialData data annotation (Placement(
        transformation(extent={{50,-100},{70,-80}})), choicesAllMatching=true);
  replaceable parameter PartialData data annotation (Placement(transformation(
          extent={{50,-100},{70,-80}})), choicesAllMatching=true);
  replaceable PartialControlBus controlBus annotation (Placement(transformation(
          extent={{-20,-120},{20,-80}})), choicesAllMatching=true);
  replaceable parameter PartialStructure structure annotation (Placement(
        transformation(extent={{-70,-100},{-50,-80}})), choicesAllMatching=true);
  annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
        coordinateSystem(preserveAspectRatio=false, extent={{-180,-100},{180,
            100}})));
        coordinateSystem(preserveAspectRatio=false, extent={{-180,-100},{180,100}})));
end PartialSources;
+4 −4
Original line number Diff line number Diff line
@@ -51,21 +51,21 @@ partial model PartialTest_FourPort_across_mT_pT_mT_pT
        (V=0.1),
    nPorts_a=1,
    nPorts_b=n)
    annotation (Placement(transformation(extent={{40,-50},{20,-30}})));
    annotation (Placement(transformation(extent={{50,-50},{30,-30}})));
equation

  connect(boundary_inlet_1.ports[1], plenum_inlet_1.port_a[1])
    annotation (Line(points={{-60,40},{-46,40}}, color={0,127,255}));
  connect(boundary_inlet_2.ports[1], plenum_inlet_2.port_a[1])
    annotation (Line(points={{60,-40},{36,-40}}, color={0,127,255}));
    annotation (Line(points={{60,-40},{46,-40}}, color={0,127,255}));
  connect(plenum_inlet_1.port_b, simulator.port_a1) annotation (Line(points={{-34,
          40},{-20,40},{-20,6},{-10,6}}, color={0,127,255}));
  connect(boundary_outlet_2.ports, simulator.port_b2) annotation (Line(points={
          {-60,-40},{-20,-40},{-20,-6},{-10,-6}}, color={0,127,255}));
  connect(boundary_outlet_1.ports, simulator.port_b1) annotation (Line(points={
          {60,40},{20,40},{20,6},{10,6}}, color={0,127,255}));
  connect(plenum_inlet_2.port_b, simulator.port_a2) annotation (Line(points={{
          24,-40},{20,-40},{20,-6},{10,-6}}, color={0,127,255}));
  connect(plenum_inlet_2.port_b, simulator.port_a2) annotation (Line(points={{34,-40},
          {20,-40},{20,-6},{10,-6}},         color={0,127,255}));
  annotation (
    Icon(coordinateSystem(preserveAspectRatio=false)),
    Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-140,-100},
+73 −0
Original line number Diff line number Diff line
within ExaDigiT_AutoCSM.BaseClasses.Tests;
partial model PartialTest_FourPort_across_pT_mT_pT_mT
  extends Modelica.Icons.Example;
  extends ExaDigiT_AutoCSM.BaseClasses.Fluids.Mediums_Two;

  parameter Integer n=1
    "# of parallel instances of the model to be simulated";

  replaceable Fluids.PartialFourPort_across simulator[n] constrainedby
    Fluids.PartialFourPort_across(redeclare package Medium_1 = Medium_1,
      redeclare package Medium_2 = Medium_2) annotation (Placement(
        transformation(extent={{-10,-10},{10,10}})), choicesAllMatching=true);
  TRANSFORM.Fluid.BoundaryConditions.Boundary_pT boundary_inlet_1(
    redeclare package Medium = Medium_1,
    p=simulator[1].port_a1_start.p,
    T=simulator[1].port_a1_start.T,
    nPorts=n) annotation (Placement(transformation(extent={{-80,30},{-60,50}})));

  TRANSFORM.Fluid.BoundaryConditions.Boundary_pT boundary_inlet_2(
    redeclare package Medium = Medium_2,
    p=simulator[1].port_a2_start.p,
    T=simulator[1].port_a2_start.T,
    nPorts=n) annotation (Placement(transformation(extent={{80,-50},{60,-30}})));
  TRANSFORM.Fluid.BoundaryConditions.MassFlowSource_T boundary_outlet_2(
    redeclare package Medium = Fluids.Mediums_Two.Medium_2,
    m_flow=simulator[1].port_b2_start.m_flow,
    T=simulator[1].port_b2_start.T,
    nPorts=1)
    annotation (Placement(transformation(extent={{-80,-50},{-60,-30}})));
  TRANSFORM.Fluid.Volumes.MixingVolume plenum_outlet_2(
    redeclare package Medium = Fluids.Mediums_Two.Medium_2,
    p_start=simulator[1].port_b2_start.p,
    T_start=simulator[1].port_b2_start.T,
    redeclare replaceable model Geometry =
        TRANSFORM.Fluid.ClosureRelations.Geometry.Models.LumpedVolume.GenericVolume
        (V=0.1),
    nPorts_b=1,
    nPorts_a=n)
    annotation (Placement(transformation(extent={{-30,-50},{-50,-30}})));
  TRANSFORM.Fluid.Volumes.MixingVolume plenum_outlet_1(
    redeclare package Medium = Fluids.Mediums_Two.Medium_1,
    p_start=simulator[1].port_b1_start.p,
    T_start=simulator[1].port_b1_start.T,
    redeclare replaceable model Geometry =
        TRANSFORM.Fluid.ClosureRelations.Geometry.Models.LumpedVolume.GenericVolume
        (V=0.1),
    nPorts_b=1,
    nPorts_a=n)  annotation (Placement(transformation(extent={{30,30},{50,50}})));
  TRANSFORM.Fluid.BoundaryConditions.MassFlowSource_T boundary_outlet_1(
    redeclare package Medium = Fluids.Mediums_Two.Medium_1,
    m_flow=simulator[1].port_b1_start.m_flow,
    T=simulator[1].port_b1_start.T,
    nPorts=1) annotation (Placement(transformation(extent={{90,30},{70,50}})));
equation

  connect(boundary_inlet_2.ports, simulator.port_a2) annotation (Line(points={{
          60,-40},{20,-40},{20,-6},{10,-6}}, color={0,127,255}));
  connect(boundary_inlet_1.ports, simulator.port_a1) annotation (Line(points={{
          -60,40},{-20,40},{-20,6},{-10,6}}, color={0,127,255}));
  connect(boundary_outlet_2.ports[1], plenum_outlet_2.port_b[1])
    annotation (Line(points={{-60,-40},{-46,-40}}, color={0,127,255}));
  connect(plenum_outlet_2.port_a, simulator.port_b2) annotation (Line(points={{
          -34,-40},{-20,-40},{-20,-6},{-10,-6}}, color={0,127,255}));
  connect(plenum_outlet_1.port_b[1], boundary_outlet_1.ports[1])
    annotation (Line(points={{46,40},{70,40}}, color={0,127,255}));
  connect(plenum_outlet_1.port_a, simulator.port_b1) annotation (Line(points={{
          34,40},{20,40},{20,6},{10,6}}, color={0,127,255}));
  annotation (
    Icon(coordinateSystem(preserveAspectRatio=false)),
    Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-140,-100},
            {140,100}})),
    experiment(StopTime=2000, __Dymola_Algorithm="Dassl"));
end PartialTest_FourPort_across_pT_mT_pT_mT;
Loading