Migration to OpenModelica 1.25 and FMUs Generation
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
// CP: 65001
|
||||
// SimulationX Version: 3.8.2.45319 x64
|
||||
within AIDAModelica;
|
||||
model ComputeTotalThrustCA "[SF2.4.2] Compute total thrust"
|
||||
Modelica.Blocks.Interfaces.RealInput AccelerationConsign(
|
||||
quantity="Mechanics.Translation.Accel",
|
||||
displayUnit="m/s²") "Acceleration consign" annotation(Placement(
|
||||
transformation(extent={{-20,-20},{20,20}}),
|
||||
iconTransformation(extent={{-120,-20},{-80,20}})));
|
||||
Modelica.Blocks.Interfaces.RealOutput TotalThrustAP(
|
||||
quantity="Mechanics.Translation.Force",
|
||||
displayUnit="N") "Total thrust autopilot mode" annotation(Placement(
|
||||
transformation(extent={{-10,-10},{10,10}}),
|
||||
iconTransformation(extent={{90,-10},{110,10}})));
|
||||
parameter Real m(
|
||||
quantity="Basics.Mass",
|
||||
displayUnit="kg")=1.8 "Parameter m";
|
||||
Real AC(
|
||||
quantity="Mechanics.Translation.Velocity",
|
||||
displayUnit="m/s") "Altitude consign";
|
||||
parameter Real N=-1 "Acceleration linear threshold";
|
||||
equation
|
||||
// enter your equations here
|
||||
AC = AccelerationConsign;
|
||||
|
||||
//TotalThrustAP =if AC<0 then -m*AC else 0;
|
||||
//to prevent loss of attitude control due to a nul thrust
|
||||
TotalThrustAP =if AC<N then -m*AC else -m*N*exp(1/N*(AC-N));
|
||||
annotation(
|
||||
Icon(graphics={
|
||||
Rectangle(
|
||||
fillColor={255,255,255},
|
||||
fillPattern=FillPattern.Solid,
|
||||
extent={{-100,100},{100,-100}}),
|
||||
Text(
|
||||
textString="* m",
|
||||
fillPattern=FillPattern.None,
|
||||
extent={{-70,26.7},{73.3,-30}}),
|
||||
Line(
|
||||
points={{-3.3,76.7},{-3.3,76.7},{0,-76.7}},
|
||||
color={192,192,192},
|
||||
arrow={Arrow.Filled,Arrow.None}),
|
||||
Line(
|
||||
points={{-1.1,51.1},{-1.1,51.1},{8.4,-104.1}},
|
||||
color={192,192,192},
|
||||
arrow={Arrow.Filled,Arrow.None},
|
||||
origin={24.4,-63.7},
|
||||
rotation=-93),
|
||||
Line(
|
||||
points={{-81.09999999999999,95.59999999999999},{8.9,-47.8},{72.2,-47.8}},
|
||||
origin={-8.9,-18.9})}),
|
||||
experiment(
|
||||
StopTime=1,
|
||||
StartTime=0,
|
||||
Interval=0.002,
|
||||
MaxInterval="0.001"));
|
||||
end ComputeTotalThrustCA;
|
||||
Reference in New Issue
Block a user