Demo entry 4798963

Adsorption

   

Submitted by anonymous on May 18, 2016 at 13:48
Language: Modelica. Code size: 2.0 kB.

model Adso

  Modelica.Blocks.Interfaces.RealOutput y
    annotation (Placement(transformation(extent={{100,-4},{120,16}})));
  Modelica.Blocks.Interfaces.RealInput n_Tr_1promin
    annotation (Placement(transformation(extent={{-122,-11},{-100,11}})));
  Modelica.Blocks.Interfaces.RealInput RF_Prozent annotation (Placement(
        transformation(
        extent={{-11,-11},{11,11}},
        rotation=270,
        origin={-1,111})));

  Modelica.Blocks.Interfaces.RealInput mmWS_2 annotation (Placement(
        transformation(
        extent={{-11,-11},{11,11}},
        rotation=270,
        origin={-79,109})));

protected 
           Modelica.Blocks.Tables.CombiTable2D combiTable2D(smoothness=Modelica.Blocks.Types.Smoothness.LinearSegments,
           table=[0.0,0,50,80,190,205,240,300,310; 0,0,0,0,0,0,0,0,0; 0.01,0,0,0,0,0,0,0,0;
           2,0.02,0.02,0.005,0.002,0.00025,0,0,0; 10,0.03,0.04,0.01,
           0.002,0.00025,0,0,0; 30,0.07,0.07,0.04,0.006,0.0007,0.005,0,0;
           60,0.16,0.15,0.14,0.026,0.01,0.005,0,0; 80,0.17,0.16,0.15,
           0.026,0.02,0.008,0,0; 150,0.2,0.19,0.18,0.05,0.04,0.02,0,0;
           200,0.2,0.19,0.18,0.05,0.04,0.02,0,0]); // mmWS und Restfeuchte bestimmen Flottenstand

  // Parameters
  parameter Boolean generateEvent=false; //Choose whether events shall be generated
  parameter Real uMax= 100 "Upper limits of input signals";
  parameter Real uMin= 0 "Lower limits of input signals";

  // State variables
  Real mass_dot_ads;
  Real u4;

equation 
  combiTable2D.u1=mmWS_2;     // mmWS und Restfeuchte bestimmen Flottenstand
  combiTable2D.u2=RF_Prozent;
  combiTable2D.y=u4;

  mass_dot_ads = u4;

algorithm 
  //Limiter
  if mass_dot_ads > uMax then y :=uMax;  elseif mass_dot_ads < uMin then y :=uMin;  else y :=mass_dot_ads;
  end if;
  annotation (Diagram(coordinateSystem(preserveAspectRatio=false,
          extent={{-100,-100},{100,100}})));
end Adso;

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).