| 1 | // Convert from Modelica 2.2.2 to Modelica 3.0 |
|---|
| 2 | |
|---|
| 3 | // clear |
|---|
| 4 | convertClear(); |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | // Change references to classes that are removed from Modelica Standard Library |
|---|
| 8 | convertClass("Modelica.Icons.Enumeration", |
|---|
| 9 | "ObsoleteModelica3.Icons.Enumeration") |
|---|
| 10 | convertClass("Modelica.Blocks.Math.UnitConversions.ConvertAllUnits", |
|---|
| 11 | "ObsoleteModelica3.Blocks.Math.UnitConversions.ConvertAllUnits"); |
|---|
| 12 | convertClass("Modelica.Blocks.Math.TwoInputs", |
|---|
| 13 | "ObsoleteModelica3.Blocks.Math.TwoInputs"); |
|---|
| 14 | convertClass("Modelica.Blocks.Math.TwoOutputs", |
|---|
| 15 | "ObsoleteModelica3.Blocks.Math.TwoOutputs"); |
|---|
| 16 | convertClass("Modelica.Blocks.Interfaces.Adaptors.AdaptorReal", |
|---|
| 17 | "ObsoleteModelica3.Blocks.Interfaces.Adaptors.AdaptorReal"); |
|---|
| 18 | convertClass("Modelica.Blocks.Interfaces.Adaptors.AdaptorBoolean", |
|---|
| 19 | "ObsoleteModelica3.Blocks.Interfaces.Adaptors.AdaptorBoolean"); |
|---|
| 20 | convertClass("Modelica.Blocks.Interfaces.Adaptors.AdaptorInteger", |
|---|
| 21 | "ObsoleteModelica3.Blocks.Interfaces.Adaptors.AdaptorInteger"); |
|---|
| 22 | convertClass("Modelica.Blocks.Interfaces.RealSignal", |
|---|
| 23 | "ObsoleteModelica3.Blocks.Interfaces.RealSignal"); |
|---|
| 24 | convertClass("Modelica.Blocks.Interfaces.IntegerSignal", |
|---|
| 25 | "ObsoleteModelica3.Blocks.Interfaces.IntegerSignal"); |
|---|
| 26 | convertClass("Modelica.Blocks.Interfaces.BooleanSignal", |
|---|
| 27 | "ObsoleteModelica3.Blocks.Interfaces.BooleanSignal"); |
|---|
| 28 | |
|---|
| 29 | convertClass("Modelica.Blocks.Types.StateSelection.Temp", |
|---|
| 30 | "StateSelect") |
|---|
| 31 | convertClass("Modelica.Blocks.Types.StateSelection.Never", |
|---|
| 32 | "StateSelect.never") |
|---|
| 33 | convertClass("Modelica.Blocks.Types.StateSelection.Avoid", |
|---|
| 34 | "StateSelect.avoid") |
|---|
| 35 | convertClass("Modelica.Blocks.Types.StateSelection.Default", |
|---|
| 36 | "StateSelect.default") |
|---|
| 37 | convertClass("Modelica.Blocks.Types.StateSelection.Prefer", |
|---|
| 38 | "StateSelect.prefer") |
|---|
| 39 | convertClass("Modelica.Blocks.Types.StateSelection.Always", |
|---|
| 40 | "StateSelect.always") |
|---|
| 41 | |
|---|
| 42 | convertClass("Modelica.Mechanics.MultiBody.Types.Init", |
|---|
| 43 | "ObsoleteModelica3.Mechanics.MultiBody.Types.Init") |
|---|
| 44 | convertClass("Modelica.Mechanics.MultiBody.Types.AngularVelocity_degs", |
|---|
| 45 | "ObsoleteModelica3.Mechanics.MultiBody.Types.AngularVelocity_degs") |
|---|
| 46 | convertClass("Modelica.Mechanics.MultiBody.Types.AngularAcceleration_degs2", |
|---|
| 47 | "ObsoleteModelica3.Mechanics.MultiBody.Types.AngularAcceleration_degs2") |
|---|
| 48 | convertClass("Modelica.Mechanics.MultiBody.Sensors.RelativeSensor", |
|---|
| 49 | "ObsoleteModelica3.Mechanics.MultiBody.Sensors.RelativeSensor") |
|---|
| 50 | convertClass("Modelica.Mechanics.MultiBody.Sensors.AbsoluteSensor", |
|---|
| 51 | "ObsoleteModelica3.Mechanics.MultiBody.Sensors.AbsoluteSensor") |
|---|
| 52 | convertClass("Modelica.Mechanics.MultiBody.Interfaces.PartialCutForceSensor", |
|---|
| 53 | "ObsoleteModelica3.Mechanics.MultiBody.Interfaces.PartialCutForceSensor") |
|---|
| 54 | |
|---|
| 55 | |
|---|
| 56 | convertClass("Modelica.Mechanics.Rotational.Types.Init", |
|---|
| 57 | "ObsoleteModelica3.Mechanics.Rotational.Types.Init") |
|---|
| 58 | convertClass("Modelica.Mechanics.Rotational.Types.InitRel", |
|---|
| 59 | "ObsoleteModelica3.Mechanics.Rotational.Types.InitRel") |
|---|
| 60 | |
|---|
| 61 | |
|---|
| 62 | // Remove "SignalType" from all RealInput and RealOutput modifiers |
|---|
| 63 | convertModifiers("Modelica.Blocks.Interfaces.RealInput",{"SignalType"},fill("",0),true); |
|---|
| 64 | convertModifiers("Modelica.Blocks.Interfaces.RealOutput",{"SignalType"},fill("",0),true); |
|---|
| 65 | convertModifiers("Modelica.Blocks.Interfaces.RealSignal",{"SignalType"},fill("",0),true); |
|---|
| 66 | |
|---|
| 67 | |
|---|
| 68 | // Change modifiers of PartialMedium.BaseProperties to equations in the equation section, |
|---|
| 69 | // since the variable declarations of p,h,Xi have been changed to connectors |
|---|
| 70 | // (in order that a BaseProperties model is "balanced") |
|---|
| 71 | convertModifiers("Modelica.Media.Interfaces.PartialMedium.BaseProperties",{"p", "h" ,"Xi"}, {"equation"}); |
|---|
| 72 | |
|---|
| 73 | |
|---|
| 74 | // Rename references to classes that are moved |
|---|
| 75 | convertClass("Modelica.Mechanics.MultiBody.Frames.length", |
|---|
| 76 | "Modelica.Math.Vectors.length") |
|---|
| 77 | convertClass("Modelica.Mechanics.MultiBody.Frames.normalize", |
|---|
| 78 | "Modelica.Math.Vectors.normalize") |
|---|
| 79 | |
|---|
| 80 | // Change reference to CelsiusTemperature |
|---|
| 81 | convertClass("Modelica.SIunits.CelsiusTemperature", |
|---|
| 82 | "Modelica.SIunits.Conversions.NonSIunits.Temperature_degC") |
|---|
| 83 | |
|---|
| 84 | |
|---|
| 85 | // --------- Changing from emulated to real enumerations -------------------------------------- |
|---|
| 86 | // The enumerations in Modelica.Blocks.Types |
|---|
| 87 | convertClass("Modelica.Blocks.Types.Extrapolation.Temp","Modelica.Blocks.Types.Extrapolation") |
|---|
| 88 | convertClass("Modelica.Blocks.Types.Init.Temp","Modelica.Blocks.Types.Init") |
|---|
| 89 | convertClass("Modelica.Blocks.Types.InitPID.Temp","Modelica.Blocks.Types.InitPID") |
|---|
| 90 | convertClass("Modelica.Blocks.Types.SimpleController.Temp","Modelica.Blocks.Types.SimpleController") |
|---|
| 91 | convertClass("Modelica.Blocks.Types.Smoothness.Temp","Modelica.Blocks.Types.Smoothness") |
|---|
| 92 | convertClass("Modelica.Blocks.Types.StateSelection.Temp","StateSelect") |
|---|
| 93 | |
|---|
| 94 | // The enumerations in Modelica.Mechanics.MultiBody.Types |
|---|
| 95 | convertClass("Modelica.Mechanics.MultiBody.Types.RotationTypes.Temp","Modelica.Mechanics.MultiBody.Types.RotationTypes") |
|---|
| 96 | convertClass("Modelica.Mechanics.MultiBody.Types.GravityTypes.Temp","Modelica.Mechanics.MultiBody.Types.GravityTypes") |
|---|
| 97 | convertClass("Modelica.Mechanics.MultiBody.Types.Init.Temp","Modelica.Mechanics.MultiBody.Types.Init") |
|---|
| 98 | |
|---|
| 99 | // The enumerations in Modelica.Media.Interfaces.PartialMedium.Choices |
|---|
| 100 | convertClass("Modelica.Media.Interfaces.PartialMedium.Choices.Init.Temp","Modelica.Media.Interfaces.PartialMedium.Choices.Init") |
|---|
| 101 | convertClass("Modelica.Media.Interfaces.PartialMedium.Choices.ReferenceEnthalpy.Temp","Modelica.Media.Interfaces.PartialMedium.Choices.ReferenceEnthalpy") |
|---|
| 102 | convertClass("Modelica.Media.Interfaces.PartialMedium.Choices.ReferenceEntropy.Temp","Modelica.Media.Interfaces.PartialMedium.Choices.ReferenceEntropy") |
|---|
| 103 | convertClass("Modelica.Media.Interfaces.PartialMedium.Choices.pd.Temp","Modelica.Media.Interfaces.PartialMedium.Choices.pd") |
|---|
| 104 | convertClass("Modelica.Media.Interfaces.PartialMedium.Choices.Th.Temp","Modelica.Media.Interfaces.PartialMedium.Choices.Th") |
|---|
| 105 | convertClass("Modelica.Media.Interfaces.PartialMedium.Choices.Explicit.Temp","Modelica.Media.Interfaces.PartialMedium.Choices.Explicit") |
|---|
| 106 | |
|---|
| 107 | // The enumerations in Modelica.Electrical.Digital.Interfaces |
|---|
| 108 | convertClass("Modelica.Electrical.Digital.Interfaces.LogicValue","Modelica.Electrical.Digital.Interfaces.Logic") |
|---|
| 109 | |
|---|
| 110 | // The enumerations in Modelica.Utilities.Types |
|---|
| 111 | convertClass("Modelica.Utilities.Types.Compare.Type" ,"Modelica.Utilities.Types.Compare") |
|---|
| 112 | convertClass("Modelica.Utilities.Types.FileType.Type" ,"Modelica.Utilities.Types.FileType") |
|---|
| 113 | convertClass("Modelica.Utilities.Types.TokenType.Type","Modelica.Utilities.Types.TokenType") |
|---|
| 114 | |
|---|
| 115 | |
|---|
| 116 | // --------- Changing from non-SI to SI units to allow stricter unit checking ------------------------- |
|---|
| 117 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyBox" ,{"density"}, {"density=%density%*1000"}); |
|---|
| 118 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyCylinder",{"density"}, {"density=%density%*1000"}); |
|---|
| 119 | |
|---|
| 120 | |
|---|
| 121 | // --------- Modelica.Blocks.Continuous.CriticalDamping - introduce value for new parameter normalized |
|---|
| 122 | convertModifiers("Modelica.Blocks.Continuous.CriticalDamping",fill("",0), {"normalized=false"}); |
|---|
| 123 | |
|---|
| 124 | |
|---|
| 125 | // --------- Modelica.Blocks - Change of start values --------------------------------------------------- |
|---|
| 126 | convertModifiers("Modelica.Blocks.Continuous.TransferFunction",{"b={1}", "a={1,1}"}, {"b=%b%", "a=%a%"}); |
|---|
| 127 | |
|---|
| 128 | convertModifiers("Modelica.Blocks.Continuous.StateSpace",{"A=[1, 0; 0, 1]", "B=[1; 1]", "C=[1, 1]"}, |
|---|
| 129 | {"A=%A%", "B=%B%", "C=%C%"}); |
|---|
| 130 | |
|---|
| 131 | convertModifiers("Modelica.Blocks.Discrete.TransferFunction",{"b={1}", "a={1,1}"}, {"b=%b%", "a=%a%"}); |
|---|
| 132 | |
|---|
| 133 | convertModifiers("Modelica.Blocks.Discrete.StateSpace",{"A=[1, 0; 0, 1]", "B=[1; 1]", "C=[1, 1]"}, |
|---|
| 134 | {"A=%A%", "B=%B%", "C=%C%"}); |
|---|
| 135 | |
|---|
| 136 | |
|---|
| 137 | |
|---|
| 138 | // --------- initialization of 1-dim. rotational systems with start values ------------------------------ |
|---|
| 139 | |
|---|
| 140 | // Modelica.Mechanics.Rotational.Inertia |
|---|
| 141 | convertElement ("Modelica.Mechanics.Rotational.Inertia", "stateSelection", "stateSelect"); |
|---|
| 142 | convertModifiers("Modelica.Mechanics.Rotational.Inertia",{"phi_start"}, {"phi.start=%phi_start%"}); |
|---|
| 143 | convertModifiers("Modelica.Mechanics.Rotational.Inertia",{"w_start"} , {"w.start=%w_start%"}); |
|---|
| 144 | convertModifiers("Modelica.Mechanics.Rotational.Inertia",{"a_start"} , {"a.start=%a_start%"}); |
|---|
| 145 | convertModifiers("Modelica.Mechanics.Rotational.Inertia",{"initType"} , |
|---|
| 146 | {"phi.fixed=if (%initType%==3 or "+ |
|---|
| 147 | "%initType%==4 or "+ |
|---|
| 148 | "%initType%==7 or "+ |
|---|
| 149 | "%initType%==9) then true else false", |
|---|
| 150 | "w.fixed=if (%initType%==2 or "+ |
|---|
| 151 | "%initType%==3 or "+ |
|---|
| 152 | "%initType%==5 or "+ |
|---|
| 153 | "%initType%==8 or "+ |
|---|
| 154 | "%initType%==9) then true else false", |
|---|
| 155 | "a.fixed=if (%initType%==2 or "+ |
|---|
| 156 | "%initType%==6 or "+ |
|---|
| 157 | "%initType%==7 or "+ |
|---|
| 158 | "%initType%==8 or "+ |
|---|
| 159 | "%initType%==9) then true else false"}, true); |
|---|
| 160 | |
|---|
| 161 | // Modelica.Mechanics.Rotational.SpringDamper |
|---|
| 162 | convertElement ("Modelica.Mechanics.Rotational.SpringDamper", "stateSelection", "stateSelect"); |
|---|
| 163 | convertModifiers("Modelica.Mechanics.Rotational.SpringDamper",{"phi_rel_start"}, {"phi_rel.start=%phi_rel_start%"}); |
|---|
| 164 | convertModifiers("Modelica.Mechanics.Rotational.SpringDamper",{"w_rel_start"} , {"w_rel.start=%w_rel_start%"}); |
|---|
| 165 | convertModifiers("Modelica.Mechanics.Rotational.SpringDamper",{"initType"} , |
|---|
| 166 | {"phi_rel.fixed=if (%initType%==3 or "+ |
|---|
| 167 | "%initType%==4) then true else false", |
|---|
| 168 | "w_rel.fixed=if (%initType%==2 or "+ |
|---|
| 169 | "%initType%==3 or "+ |
|---|
| 170 | "%initType%==5) then true else false", |
|---|
| 171 | "a_rel.fixed=if (%initType%==2) then true else false"}, true); |
|---|
| 172 | |
|---|
| 173 | // Modelica.Mechanics.Rotational.InitializeFlange |
|---|
| 174 | convertElement("Modelica.Mechanics.Rotational.InitializeFlange", "stateSelection", "stateSelect"); |
|---|
| 175 | |
|---|
| 176 | |
|---|
| 177 | // Modelica.Mechanics.MultiBody.Parts.Rotor1D |
|---|
| 178 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.Rotor1D",{"phi_start"}, {"phi.start=%phi_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 179 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.Rotor1D",{"w_start"} , {"w.start=%w_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 180 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.Rotor1D",{"a_start"} , {"a.start=%a_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 181 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.Rotor1D",{"initType"} , |
|---|
| 182 | {"phi.fixed=if (%initType%==2 or "+ |
|---|
| 183 | "%initType%==4 or "+ |
|---|
| 184 | "%initType%==7) then true else false", |
|---|
| 185 | "w.fixed=if (%initType%==2 or "+ |
|---|
| 186 | "%initType%==3 or "+ |
|---|
| 187 | "%initType%==5 or "+ |
|---|
| 188 | "%initType%==6 or "+ |
|---|
| 189 | "%initType%==7) then true else false", |
|---|
| 190 | "a.fixed=if (%initType%==3 or "+ |
|---|
| 191 | "%initType%==6 or "+ |
|---|
| 192 | "%initType%==7) then true else false"}, true); |
|---|
| 193 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.Rotor1D",{"enforceStates"}, |
|---|
| 194 | {"stateSelect=if (%enforceStates%) then StateSelect.prefer else StateSelect.default"}, true); |
|---|
| 195 | |
|---|
| 196 | |
|---|
| 197 | // --------- initialization of 1-dim. translational systems with start values ----------------------------- |
|---|
| 198 | |
|---|
| 199 | // Modelica.Mechanics.Rotational.Inertia |
|---|
| 200 | convertModifiers("Modelica.Mechanics.Translational.Speed" ,{"s_start"}, {"s.start=%s_start%"}); |
|---|
| 201 | convertModifiers("Modelica.Mechanics.Translational.Accelerate",{"s_start"}, {"s.start=%s_start%"}); |
|---|
| 202 | convertModifiers("Modelica.Mechanics.Translational.Accelerate",{"v_start"}, {"v.start=%v_start%"}); |
|---|
| 203 | |
|---|
| 204 | |
|---|
| 205 | |
|---|
| 206 | // --------- initialization of 3-dim. rotational systems with start values ------------------------------ |
|---|
| 207 | |
|---|
| 208 | // Modelica.Mechanics.MultiBody.Joints.Internal.Revolute |
|---|
| 209 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Internal.Revolute",{"phi_offset"}, {"phi_offset=%phi_offset%*(3.14159265358979323846/180)"}, true); |
|---|
| 210 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Internal.Revolute",{"phi_start"}, {"phi.start=%phi_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 211 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Internal.Revolute",{"w_start"} , {"w.start=%w_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 212 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Internal.Revolute",{"a_start"} , {"a.start=%a_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 213 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Internal.Revolute",{"initType"} , |
|---|
| 214 | {"phi.fixed=if (%initType%==2 or "+ |
|---|
| 215 | "%initType%==4 or "+ |
|---|
| 216 | "%initType%==7) then true else false", |
|---|
| 217 | "w.fixed=if (%initType%==2 or "+ |
|---|
| 218 | "%initType%==3 or "+ |
|---|
| 219 | "%initType%==5 or "+ |
|---|
| 220 | "%initType%==6 or "+ |
|---|
| 221 | "%initType%==7) then true else false", |
|---|
| 222 | "a.fixed=if (%initType%==3 or "+ |
|---|
| 223 | "%initType%==6 or "+ |
|---|
| 224 | "%initType%==7) then true else false"}, true); |
|---|
| 225 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Internal.Revolute",{"enforceStates"}, |
|---|
| 226 | {"stateSelect=if (%enforceStates%) then StateSelect.always else StateSelect.prefer"}, true); |
|---|
| 227 | |
|---|
| 228 | // Modelica.Mechanics.MultiBody.Joints.Revolute |
|---|
| 229 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Revolute",{"phi_offset"}, {"phi_offset=%phi_offset%*(3.14159265358979323846/180)"}, true); |
|---|
| 230 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Revolute",{"phi_start"}, {"phi.start=%phi_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 231 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Revolute",{"w_start"} , {"w.start=%w_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 232 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Revolute",{"a_start"} , {"a.start=%a_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 233 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Revolute",{"initType"} , |
|---|
| 234 | {"phi.fixed=if (%initType%==2 or "+ |
|---|
| 235 | "%initType%==4 or "+ |
|---|
| 236 | "%initType%==7) then true else false", |
|---|
| 237 | "w.fixed=if (%initType%==2 or "+ |
|---|
| 238 | "%initType%==3 or "+ |
|---|
| 239 | "%initType%==5 or "+ |
|---|
| 240 | "%initType%==6 or "+ |
|---|
| 241 | "%initType%==7) then true else false", |
|---|
| 242 | "a.fixed=if (%initType%==3 or "+ |
|---|
| 243 | "%initType%==6 or "+ |
|---|
| 244 | "%initType%==7) then true else false"}, true); |
|---|
| 245 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Revolute",{"enforceStates"}, |
|---|
| 246 | {"stateSelect=if (%enforceStates%) then StateSelect.always else StateSelect.prefer"}, true); |
|---|
| 247 | |
|---|
| 248 | // Modelica.Mechanics.MultiBody.Joints.ActuatedRevolute |
|---|
| 249 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.ActuatedRevolute",{"phi_offset"}, {"phi_offset=%phi_offset%*(3.14159265358979323846/180)"}, true); |
|---|
| 250 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.ActuatedRevolute",{"phi_start"}, {"phi.start=%phi_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 251 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.ActuatedRevolute",{"w_start"} , {"w.start=%w_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 252 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.ActuatedRevolute",{"a_start"} , {"a.start=%a_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 253 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.ActuatedRevolute",{"initType"} , |
|---|
| 254 | {"phi.fixed=if (%initType%==2 or "+ |
|---|
| 255 | "%initType%==4 or "+ |
|---|
| 256 | "%initType%==7) then true else false", |
|---|
| 257 | "w.fixed=if (%initType%==2 or "+ |
|---|
| 258 | "%initType%==3 or "+ |
|---|
| 259 | "%initType%==5 or "+ |
|---|
| 260 | "%initType%==6 or "+ |
|---|
| 261 | "%initType%==7) then true else false", |
|---|
| 262 | "a.fixed=if (%initType%==3 or "+ |
|---|
| 263 | "%initType%==6 or "+ |
|---|
| 264 | "%initType%==7) then true else false"}, true); |
|---|
| 265 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.ActuatedRevolute",{"enforceStates"}, |
|---|
| 266 | {"stateSelect=if (%enforceStates%) then StateSelect.always else StateSelect.prefer"}, true); |
|---|
| 267 | |
|---|
| 268 | // Modelica.Mechanics.MultiBody.Joints.Internal.Prismatic |
|---|
| 269 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Internal.Prismatic",{"s_offset"} , {"s_offset=%s_offset%"}); |
|---|
| 270 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Internal.Prismatic",{"s_start"} , {"s.start=%s_start%"}); |
|---|
| 271 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Internal.Prismatic",{"v_start"} , {"v.start=%v_start%"}); |
|---|
| 272 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Internal.Prismatic",{"a_start"} , {"a.start=%a_start%"}); |
|---|
| 273 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Internal.Prismatic",{"initType"} , |
|---|
| 274 | {"s.fixed=if (%initType%==2 or "+ |
|---|
| 275 | "%initType%==4 or "+ |
|---|
| 276 | "%initType%==7) then true else false", |
|---|
| 277 | "v.fixed=if (%initType%==2 or "+ |
|---|
| 278 | "%initType%==3 or "+ |
|---|
| 279 | "%initType%==5 or "+ |
|---|
| 280 | "%initType%==6 or "+ |
|---|
| 281 | "%initType%==7) then true else false", |
|---|
| 282 | "a.fixed=if (%initType%==3 or "+ |
|---|
| 283 | "%initType%==6 or "+ |
|---|
| 284 | "%initType%==7) then true else false"}, true); |
|---|
| 285 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Internal.Prismatic",{"enforceStates"}, |
|---|
| 286 | {"stateSelect=if (%enforceStates%) then StateSelect.always else StateSelect.prefer"}, true); |
|---|
| 287 | |
|---|
| 288 | // Modelica.Mechanics.MultiBody.Joints.Prismatic |
|---|
| 289 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Prismatic",{"s_offset"} , {"s_offset=%s_offset%"}); |
|---|
| 290 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Prismatic",{"s_start"} , {"s.start=%s_start%"}); |
|---|
| 291 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Prismatic",{"v_start"} , {"v.start=%v_start%"}); |
|---|
| 292 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Prismatic",{"a_start"} , {"a.start=%a_start%"}); |
|---|
| 293 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Prismatic",{"initType"} , |
|---|
| 294 | {"s.fixed=if (%initType%==2 or "+ |
|---|
| 295 | "%initType%==4 or "+ |
|---|
| 296 | "%initType%==7) then true else false", |
|---|
| 297 | "v.fixed=if (%initType%==2 or "+ |
|---|
| 298 | "%initType%==3 or "+ |
|---|
| 299 | "%initType%==5 or "+ |
|---|
| 300 | "%initType%==6 or "+ |
|---|
| 301 | "%initType%==7) then true else false", |
|---|
| 302 | "a.fixed=if (%initType%==3 or "+ |
|---|
| 303 | "%initType%==6 or "+ |
|---|
| 304 | "%initType%==7) then true else false"}, true); |
|---|
| 305 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Prismatic",{"enforceStates"}, |
|---|
| 306 | {"stateSelect=if (%enforceStates%) then StateSelect.always else StateSelect.prefer"}, true); |
|---|
| 307 | |
|---|
| 308 | |
|---|
| 309 | // Modelica.Mechanics.MultiBody.Joints.ActuatedPrismatic |
|---|
| 310 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.ActuatedPrismatic",{"s_offset"} , {"s_offset=%s_offset%"}); |
|---|
| 311 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.ActuatedPrismatic",{"s_start"} , {"s.start=%s_start%"}); |
|---|
| 312 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.ActuatedPrismatic",{"v_start"} , {"v.start=%v_start%"}); |
|---|
| 313 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.ActuatedPrismatic",{"a_start"} , {"a.start=%a_start%"}); |
|---|
| 314 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.ActuatedPrismatic",{"initType"} , |
|---|
| 315 | {"s.fixed=if (%initType%==2 or "+ |
|---|
| 316 | "%initType%==4 or "+ |
|---|
| 317 | "%initType%==7) then true else false", |
|---|
| 318 | "v.fixed=if (%initType%==2 or "+ |
|---|
| 319 | "%initType%==3 or "+ |
|---|
| 320 | "%initType%==5 or "+ |
|---|
| 321 | "%initType%==6 or "+ |
|---|
| 322 | "%initType%==7) then true else false", |
|---|
| 323 | "a.fixed=if (%initType%==3 or "+ |
|---|
| 324 | "%initType%==6 or "+ |
|---|
| 325 | "%initType%==7) then true else false"}, true); |
|---|
| 326 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.ActuatedPrismatic",{"enforceStates"}, |
|---|
| 327 | {"stateSelect=if (%enforceStates%) then StateSelect.always else StateSelect.prefer"}, true); |
|---|
| 328 | |
|---|
| 329 | // Modelica.Mechanics.MultiBody.Joints.Cylindrical |
|---|
| 330 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Cylindrical",{"s_start"} , {"s.start=%s_start%"}); |
|---|
| 331 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Cylindrical",{"v_start"} , {"v.start=%v_start%"}); |
|---|
| 332 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Cylindrical",{"a_start"} , {"a.start=%a_start%"}); |
|---|
| 333 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Cylindrical",{"phi_start"}, {"phi.start=%phi_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 334 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Cylindrical",{"w_start"} , {"w.start=%w_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 335 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Cylindrical",{"wd_start"} , {"wd.start=%wd_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 336 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Cylindrical",{"initType"} , |
|---|
| 337 | {"s.fixed=if (%initType%==2 or "+ |
|---|
| 338 | "%initType%==4 or "+ |
|---|
| 339 | "%initType%==7) then true else false", |
|---|
| 340 | "v.fixed=if (%initType%==2 or "+ |
|---|
| 341 | "%initType%==3 or "+ |
|---|
| 342 | "%initType%==5 or "+ |
|---|
| 343 | "%initType%==6 or "+ |
|---|
| 344 | "%initType%==7) then true else false", |
|---|
| 345 | "a.fixed=if (%initType%==3 or "+ |
|---|
| 346 | "%initType%==6 or "+ |
|---|
| 347 | "%initType%==7) then true else false", |
|---|
| 348 | "phi.fixed=if (%initType%==2 or "+ |
|---|
| 349 | "%initType%==4 or "+ |
|---|
| 350 | "%initType%==7) then true else false", |
|---|
| 351 | "w.fixed=if (%initType%==2 or "+ |
|---|
| 352 | "%initType%==3 or "+ |
|---|
| 353 | "%initType%==5 or "+ |
|---|
| 354 | "%initType%==6 or "+ |
|---|
| 355 | "%initType%==7) then true else false", |
|---|
| 356 | "wd.fixed=if (%initType%==3 or "+ |
|---|
| 357 | "%initType%==6 or "+ |
|---|
| 358 | "%initType%==7) then true else false"}, true); |
|---|
| 359 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Cylindrical",{"enforceStates"}, |
|---|
| 360 | {"stateSelect=if (%enforceStates%) then StateSelect.always else StateSelect.prefer"}, true); |
|---|
| 361 | |
|---|
| 362 | |
|---|
| 363 | // Modelica.Mechanics.MultiBody.Joints.Universal |
|---|
| 364 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Universal",{"phi_start_a"}, {"phi_a.start=%phi_start_a%*(3.14159265358979323846/180)"}, true); |
|---|
| 365 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Universal",{"w_start_a"} , {"w_a.start=%w_start_a%*(3.14159265358979323846/180)"}, true); |
|---|
| 366 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Universal",{"a_start_a"} , {"a_a.start=%a_start_a%*(3.14159265358979323846/180)"}, true); |
|---|
| 367 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Universal",{"phi_start_b"}, {"phi_b.start=%phi_start_b%*(3.14159265358979323846/180)"}, true); |
|---|
| 368 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Universal",{"w_start_b"} , {"w_b.start=%w_start_b%*(3.14159265358979323846/180)"}, true); |
|---|
| 369 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Universal",{"a_start_b"} , {"a_b.start=%a_start_b%*(3.14159265358979323846/180)"}, true); |
|---|
| 370 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Universal",{"initType"} , |
|---|
| 371 | {"phi_a.fixed=if (%initType%==2 or "+ |
|---|
| 372 | "%initType%==4 or "+ |
|---|
| 373 | "%initType%==7) then true else false", |
|---|
| 374 | "w_a.fixed=if (%initType%==2 or "+ |
|---|
| 375 | "%initType%==3 or "+ |
|---|
| 376 | "%initType%==5 or "+ |
|---|
| 377 | "%initType%==6 or "+ |
|---|
| 378 | "%initType%==7) then true else false", |
|---|
| 379 | "a_a.fixed=if (%initType%==3 or "+ |
|---|
| 380 | "%initType%==6 or "+ |
|---|
| 381 | "%initType%==7) then true else false", |
|---|
| 382 | "phi_b.fixed=if (%initType%==2 or "+ |
|---|
| 383 | "%initType%==4 or "+ |
|---|
| 384 | "%initType%==7) then true else false", |
|---|
| 385 | "w_b.fixed=if (%initType%==2 or "+ |
|---|
| 386 | "%initType%==3 or "+ |
|---|
| 387 | "%initType%==5 or "+ |
|---|
| 388 | "%initType%==6 or "+ |
|---|
| 389 | "%initType%==7) then true else false", |
|---|
| 390 | "a_b.fixed=if (%initType%==3 or "+ |
|---|
| 391 | "%initType%==6 or "+ |
|---|
| 392 | "%initType%==7) then true else false"}, true); |
|---|
| 393 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Universal",{"enforceStates"}, |
|---|
| 394 | {"stateSelect=if (%enforceStates%) then StateSelect.always else StateSelect.prefer"}, true); |
|---|
| 395 | |
|---|
| 396 | // Modelica.Mechanics.MultiBody.Joints.Planar |
|---|
| 397 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Planar",{"s_start_x"}, {"s_x.start=%s_start_x%"}); |
|---|
| 398 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Planar",{"v_start_x"}, {"v_x.start=%v_start_x%"}); |
|---|
| 399 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Planar",{"a_start_x"}, {"a_x.start=%a_start_x%"}); |
|---|
| 400 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Planar",{"s_start_y"}, {"s_y.start=%s_start_y%"}); |
|---|
| 401 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Planar",{"v_start_y"}, {"v_y.start=%v_start_y%"}); |
|---|
| 402 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Planar",{"a_start_y"}, {"a_y.start=%a_start_y%"}); |
|---|
| 403 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Planar",{"phi_start"}, {"phi.start=%phi_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 404 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Planar",{"w_start"} , {"w.start=%w_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 405 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Planar",{"wd_start"} , {"wd.start=%wd_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 406 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Planar",{"initType"} , |
|---|
| 407 | {"s_x.fixed=if (%initType%==2 or "+ |
|---|
| 408 | "%initType%==4 or "+ |
|---|
| 409 | "%initType%==7) then true else false", |
|---|
| 410 | "v_x.fixed=if (%initType%==2 or "+ |
|---|
| 411 | "%initType%==3 or "+ |
|---|
| 412 | "%initType%==5 or "+ |
|---|
| 413 | "%initType%==6 or "+ |
|---|
| 414 | "%initType%==7) then true else false", |
|---|
| 415 | "a_x.fixed=if (%initType%==3 or "+ |
|---|
| 416 | "%initType%==6 or "+ |
|---|
| 417 | "%initType%==7) then true else false", |
|---|
| 418 | "s_y.fixed=if (%initType%==2 or "+ |
|---|
| 419 | "%initType%==4 or "+ |
|---|
| 420 | "%initType%==7) then true else false", |
|---|
| 421 | "v_y.fixed=if (%initType%==2 or "+ |
|---|
| 422 | "%initType%==3 or "+ |
|---|
| 423 | "%initType%==5 or "+ |
|---|
| 424 | "%initType%==6 or "+ |
|---|
| 425 | "%initType%==7) then true else false", |
|---|
| 426 | "a_y.fixed=if (%initType%==3 or "+ |
|---|
| 427 | "%initType%==6 or "+ |
|---|
| 428 | "%initType%==7) then true else false", |
|---|
| 429 | "phi.fixed=if (%initType%==2 or "+ |
|---|
| 430 | "%initType%==4 or "+ |
|---|
| 431 | "%initType%==7) then true else false", |
|---|
| 432 | "w.fixed=if (%initType%==2 or "+ |
|---|
| 433 | "%initType%==3 or "+ |
|---|
| 434 | "%initType%==5 or "+ |
|---|
| 435 | "%initType%==6 or "+ |
|---|
| 436 | "%initType%==7) then true else false", |
|---|
| 437 | "wd.fixed=if (%initType%==3 or "+ |
|---|
| 438 | "%initType%==6 or "+ |
|---|
| 439 | "%initType%==7) then true else false"}, true); |
|---|
| 440 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Planar",{"enforceStates"}, |
|---|
| 441 | {"stateSelect=if (%enforceStates%) then StateSelect.always else StateSelect.prefer"}, true); |
|---|
| 442 | |
|---|
| 443 | |
|---|
| 444 | // Modelica.Mechanics.MultiBody.Joints.Spherical |
|---|
| 445 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Spherical",{"angles_start"} , {"angles_start=%angles_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 446 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Spherical",{"w_rel_a_start"}, {"w_rel_a_start=%w_rel_a_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 447 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Spherical",{"z_rel_a_start"}, {"z_rel_a_start=%z_rel_a_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 448 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.Spherical",{"initType"} , |
|---|
| 449 | {"angles_fixed=if (%initType%==2 or "+ |
|---|
| 450 | "%initType%==4 or "+ |
|---|
| 451 | "%initType%==7) then true else false", |
|---|
| 452 | "w_rel_a_fixed=if (%initType%==2 or "+ |
|---|
| 453 | "%initType%==3 or "+ |
|---|
| 454 | "%initType%==5 or "+ |
|---|
| 455 | "%initType%==6 or "+ |
|---|
| 456 | "%initType%==7) then true else false", |
|---|
| 457 | "z_rel_a_fixed=if (%initType%==3 or "+ |
|---|
| 458 | "%initType%==6 or "+ |
|---|
| 459 | "%initType%==7) then true else false"}, true); |
|---|
| 460 | |
|---|
| 461 | |
|---|
| 462 | // Modelica.Mechanics.MultiBody.Joints.FreeMotion |
|---|
| 463 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.FreeMotion",{"r_rel_a_start"}, {"r_rel_a.start=%r_rel_a_start%"}); |
|---|
| 464 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.FreeMotion",{"v_rel_a_start"}, {"v_rel_a.start=%v_rel_a_start%"}); |
|---|
| 465 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.FreeMotion",{"a_rel_a_start"}, {"a_rel_a.start=%a_rel_a_start%"}); |
|---|
| 466 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.FreeMotion",{"angles_start"} , {"angles_start=%angles_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 467 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.FreeMotion",{"w_rel_a_start"}, {"w_rel_a_start=%w_rel_a_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 468 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.FreeMotion",{"z_rel_a_start"}, {"z_rel_a_start=%z_rel_a_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 469 | convertModifiers("Modelica.Mechanics.MultiBody.Joints.FreeMotion",{"initType"} , |
|---|
| 470 | {"r_rel_a.fixed=if (%initType%==2 or "+ |
|---|
| 471 | "%initType%==4 or "+ |
|---|
| 472 | "%initType%==7) then true else false", |
|---|
| 473 | "v_rel_a.fixed=if (%initType%==2 or "+ |
|---|
| 474 | "%initType%==3 or "+ |
|---|
| 475 | "%initType%==5 or "+ |
|---|
| 476 | "%initType%==6 or "+ |
|---|
| 477 | "%initType%==7) then true else false", |
|---|
| 478 | "a_rel_a.fixed=if (%initType%==3 or "+ |
|---|
| 479 | "%initType%==6 or "+ |
|---|
| 480 | "%initType%==7) then true else false", |
|---|
| 481 | "angles_fixed=if (%initType%==2 or "+ |
|---|
| 482 | "%initType%==4 or "+ |
|---|
| 483 | "%initType%==7) then true else false", |
|---|
| 484 | "w_rel_a_fixed=if (%initType%==2 or "+ |
|---|
| 485 | "%initType%==3 or "+ |
|---|
| 486 | "%initType%==5 or "+ |
|---|
| 487 | "%initType%==6 or "+ |
|---|
| 488 | "%initType%==7) then true else false", |
|---|
| 489 | "z_rel_a_fixed=if (%initType%==3 or "+ |
|---|
| 490 | "%initType%==6 or "+ |
|---|
| 491 | "%initType%==7) then true else false"}, true); |
|---|
| 492 | |
|---|
| 493 | |
|---|
| 494 | // Modelica.Mechanics.MultiBody.Parts.Body |
|---|
| 495 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.Body",{"r_0_start"}, {"r_0.start=%r_0_start%"}); |
|---|
| 496 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.Body",{"v_0_start"}, {"v_0.start=%v_0_start%"}); |
|---|
| 497 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.Body",{"a_0_start"}, {"a_0.start=%a_0_start%"}); |
|---|
| 498 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.Body",{"angles_start"} , {"angles_start=%angles_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 499 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.Body",{"w_0_start"}, {"w_0_start=%w_0_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 500 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.Body",{"z_0_start"}, {"z_0_start=%z_0_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 501 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.Body",{"initType"} , |
|---|
| 502 | {"r_0.fixed=if (%initType%==2 or "+ |
|---|
| 503 | "%initType%==4 or "+ |
|---|
| 504 | "%initType%==7) then true else false", |
|---|
| 505 | "v_0.fixed=if (%initType%==2 or "+ |
|---|
| 506 | "%initType%==3 or "+ |
|---|
| 507 | "%initType%==5 or "+ |
|---|
| 508 | "%initType%==6 or "+ |
|---|
| 509 | "%initType%==7) then true else false", |
|---|
| 510 | "a_0.fixed=if (%initType%==3 or "+ |
|---|
| 511 | "%initType%==6 or "+ |
|---|
| 512 | "%initType%==7) then true else false", |
|---|
| 513 | "angles_fixed=if (%initType%==2 or "+ |
|---|
| 514 | "%initType%==4 or "+ |
|---|
| 515 | "%initType%==7) then true else false", |
|---|
| 516 | "w_0_fixed=if (%initType%==2 or "+ |
|---|
| 517 | "%initType%==3 or "+ |
|---|
| 518 | "%initType%==5 or "+ |
|---|
| 519 | "%initType%==6 or "+ |
|---|
| 520 | "%initType%==7) then true else false", |
|---|
| 521 | "z_0_fixed=if (%initType%==3 or "+ |
|---|
| 522 | "%initType%==6 or "+ |
|---|
| 523 | "%initType%==7) then true else false"}, true); |
|---|
| 524 | |
|---|
| 525 | // Modelica.Mechanics.MultiBody.Parts.BodyShape |
|---|
| 526 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyShape",{"r_0_start"}, {"r_0.start=%r_0_start%"}); |
|---|
| 527 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyShape",{"v_0_start"}, {"v_0.start=%v_0_start%"}); |
|---|
| 528 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyShape",{"a_0_start"}, {"a_0.start=%a_0_start%"}); |
|---|
| 529 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyShape",{"angles_start"} , {"angles_start=%angles_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 530 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyShape",{"w_0_start"}, {"w_0_start=%w_0_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 531 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyShape",{"z_0_start"}, {"z_0_start=%z_0_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 532 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyShape",{"initType"} , |
|---|
| 533 | {"r_0.fixed=if (%initType%==2 or "+ |
|---|
| 534 | "%initType%==4 or "+ |
|---|
| 535 | "%initType%==7) then true else false", |
|---|
| 536 | "v_0.fixed=if (%initType%==2 or "+ |
|---|
| 537 | "%initType%==3 or "+ |
|---|
| 538 | "%initType%==5 or "+ |
|---|
| 539 | "%initType%==6 or "+ |
|---|
| 540 | "%initType%==7) then true else false", |
|---|
| 541 | "a_0.fixed=if (%initType%==3 or "+ |
|---|
| 542 | "%initType%==6 or "+ |
|---|
| 543 | "%initType%==7) then true else false", |
|---|
| 544 | "angles_fixed=if (%initType%==2 or "+ |
|---|
| 545 | "%initType%==4 or "+ |
|---|
| 546 | "%initType%==7) then true else false", |
|---|
| 547 | "w_0_fixed=if (%initType%==2 or "+ |
|---|
| 548 | "%initType%==3 or "+ |
|---|
| 549 | "%initType%==5 or "+ |
|---|
| 550 | "%initType%==6 or "+ |
|---|
| 551 | "%initType%==7) then true else false", |
|---|
| 552 | "z_0_fixed=if (%initType%==3 or "+ |
|---|
| 553 | "%initType%==6 or "+ |
|---|
| 554 | "%initType%==7) then true else false"}, true); |
|---|
| 555 | |
|---|
| 556 | // Modelica.Mechanics.MultiBody.Parts.BodyBox |
|---|
| 557 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyBox",{"r_0_start"}, {"r_0.start=%r_0_start%"}); |
|---|
| 558 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyBox",{"v_0_start"}, {"v_0.start=%v_0_start%"}); |
|---|
| 559 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyBox",{"a_0_start"}, {"a_0.start=%a_0_start%"}); |
|---|
| 560 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyBox",{"angles_start"}, {"angles_start=%angles_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 561 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyBox",{"w_0_start"}, {"w_0_start=%w_0_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 562 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyBox",{"z_0_start"}, {"z_0_start=%z_0_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 563 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyBox",{"initType"} , |
|---|
| 564 | {"r_0.fixed=if (%initType%==2 or "+ |
|---|
| 565 | "%initType%==4 or "+ |
|---|
| 566 | "%initType%==7) then true else false", |
|---|
| 567 | "v_0.fixed=if (%initType%==2 or "+ |
|---|
| 568 | "%initType%==3 or "+ |
|---|
| 569 | "%initType%==5 or "+ |
|---|
| 570 | "%initType%==6 or "+ |
|---|
| 571 | "%initType%==7) then true else false", |
|---|
| 572 | "a_0.fixed=if (%initType%==3 or "+ |
|---|
| 573 | "%initType%==6 or "+ |
|---|
| 574 | "%initType%==7) then true else false", |
|---|
| 575 | "angles_fixed=if (%initType%==2 or "+ |
|---|
| 576 | "%initType%==4 or "+ |
|---|
| 577 | "%initType%==7) then true else false", |
|---|
| 578 | "w_0_fixed=if (%initType%==2 or "+ |
|---|
| 579 | "%initType%==3 or "+ |
|---|
| 580 | "%initType%==5 or "+ |
|---|
| 581 | "%initType%==6 or "+ |
|---|
| 582 | "%initType%==7) then true else false", |
|---|
| 583 | "z_0_fixed=if (%initType%==3 or "+ |
|---|
| 584 | "%initType%==6 or "+ |
|---|
| 585 | "%initType%==7) then true else false"}, true); |
|---|
| 586 | |
|---|
| 587 | |
|---|
| 588 | // Modelica.Mechanics.MultiBody.Parts.BodyCylinder |
|---|
| 589 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyCylinder",{"r_0_start"}, {"r_0.start=%r_0_start%"}); |
|---|
| 590 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyCylinder",{"v_0_start"}, {"v_0.start=%v_0_start%"}); |
|---|
| 591 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyCylinder",{"a_0_start"}, {"a_0.start=%a_0_start%"}); |
|---|
| 592 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyCylinder",{"angles_start"} , {"angles_start=%angles_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 593 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyCylinder",{"w_0_start"}, {"w_0_start=%w_0_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 594 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyCylinder",{"z_0_start"}, {"z_0_start=%z_0_start%*(3.14159265358979323846/180)"}, true); |
|---|
| 595 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.BodyCylinder",{"initType"} , |
|---|
| 596 | {"r_0.fixed=if (%initType%==2 or "+ |
|---|
| 597 | "%initType%==4 or "+ |
|---|
| 598 | "%initType%==7) then true else false", |
|---|
| 599 | "v_0.fixed=if (%initType%==2 or "+ |
|---|
| 600 | "%initType%==3 or "+ |
|---|
| 601 | "%initType%==5 or "+ |
|---|
| 602 | "%initType%==6 or "+ |
|---|
| 603 | "%initType%==7) then true else false", |
|---|
| 604 | "a_0.fixed=if (%initType%==3 or "+ |
|---|
| 605 | "%initType%==6 or "+ |
|---|
| 606 | "%initType%==7) then true else false", |
|---|
| 607 | "angles_fixed=if (%initType%==2 or "+ |
|---|
| 608 | "%initType%==4 or "+ |
|---|
| 609 | "%initType%==7) then true else false", |
|---|
| 610 | "w_0_fixed=if (%initType%==2 or "+ |
|---|
| 611 | "%initType%==3 or "+ |
|---|
| 612 | "%initType%==5 or "+ |
|---|
| 613 | "%initType%==6 or "+ |
|---|
| 614 | "%initType%==7) then true else false", |
|---|
| 615 | "z_0_fixed=if (%initType%==3 or "+ |
|---|
| 616 | "%initType%==6 or "+ |
|---|
| 617 | "%initType%==7) then true else false"}, true); |
|---|
| 618 | |
|---|
| 619 | |
|---|
| 620 | |
|---|
| 621 | // Modelica.Mechanics.MultiBody.Parts.PointMass |
|---|
| 622 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.PointMass",{"r_0_start"}, {"r_0.start=%r_0_start%"}); |
|---|
| 623 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.PointMass",{"v_0_start"}, {"v_0.start=%v_0_start%"}); |
|---|
| 624 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.PointMass",{"a_0_start"}, {"a_0.start=%a_0_start%"}); |
|---|
| 625 | convertModifiers("Modelica.Mechanics.MultiBody.Parts.PointMass",{"initType"} , |
|---|
| 626 | {"r_0.fixed=if (%initType%==2 or "+ |
|---|
| 627 | "%initType%==4 or "+ |
|---|
| 628 | "%initType%==7) then true else false", |
|---|
| 629 | "v_0.fixed=if (%initType%==2 or "+ |
|---|
| 630 | "%initType%==3 or "+ |
|---|
| 631 | "%initType%==5 or "+ |
|---|
| 632 | "%initType%==6 or "+ |
|---|
| 633 | "%initType%==7) then true else false", |
|---|
| 634 | "a_0.fixed=if (%initType%==3 or "+ |
|---|
| 635 | "%initType%==6 or "+ |
|---|
| 636 | "%initType%==7) then true else false"}, true); |
|---|
| 637 | |
|---|
| 638 | |
|---|
| 639 | // --------- initialization of Thermal.HeatTransfer with start values ---------- |
|---|
| 640 | convertModifiers("Modelica.Thermal.HeatTransfer.HeatCapacitor",{"steadyState"} , |
|---|
| 641 | {"der_T.fixed=if %steadyState% then true else false"}, true); |
|---|
| 642 | |
|---|
| 643 | |
|---|
| 644 | //--------- New design of Rotational ------------------------------------------- |
|---|
| 645 | convertClass("Modelica.Mechanics.Rotational.Interfaces.Bearing", |
|---|
| 646 | "ObsoleteModelica3.Mechanics.Rotational.Interfaces.Bearing"); |
|---|
| 647 | convertClass("Modelica.Mechanics.Rotational.Interfaces.TwoFlangesAndBearing", |
|---|
| 648 | "ObsoleteModelica3.Mechanics.Rotational.Interfaces.TwoFlangesAndBearing"); |
|---|
| 649 | convertClass("Modelica.Mechanics.Rotational.Interfaces.AbsoluteSensor", |
|---|
| 650 | "ObsoleteModelica3.Mechanics.Rotational.Interfaces.AbsoluteSensor"); |
|---|
| 651 | convertClass("Modelica.Mechanics.Rotational.Interfaces.RelativeSensor", |
|---|
| 652 | "ObsoleteModelica3.Mechanics.Rotational.Interfaces.RelativeSensor"); |
|---|
| 653 | convertClass("Modelica.Mechanics.Rotational.Interfaces.Rigid", |
|---|
| 654 | "ObsoleteModelica3.Mechanics.Rotational.Interfaces.Rigid"); |
|---|
| 655 | convertClass("Modelica.Mechanics.Rotational.Interfaces.PartialSpeedDependentTorque", |
|---|
| 656 | "ObsoleteModelica3.Mechanics.Rotational.Interfaces.PartialSpeedDependentTorque"); |
|---|
| 657 | |
|---|
| 658 | |
|---|
| 659 | convertClass("Modelica.Mechanics.Rotational.Interfaces.Compliant", |
|---|
| 660 | "Modelica.Mechanics.Rotational.Interfaces.PartialCompliant"); |
|---|
| 661 | convertClass("Modelica.Mechanics.Rotational.Interfaces.TwoFlanges", |
|---|
| 662 | "Modelica.Mechanics.Rotational.Interfaces.PartialTwoFlanges"); |
|---|
| 663 | convertClass("Modelica.Mechanics.Rotational.Interfaces.FrictionBase", |
|---|
| 664 | "Modelica.Mechanics.Rotational.Interfaces.PartialFriction"); |
|---|
| 665 | convertClass("Modelica.Mechanics.Rotational.Interfaces.AbsoluteSensor", |
|---|
| 666 | "Modelica.Mechanics.Rotational.Interfaces.PartialAbsoluteSensor"); |
|---|
| 667 | convertClass("Modelica.Mechanics.Rotational.Interfaces.RelativeSensor", |
|---|
| 668 | "Modelica.Mechanics.Rotational.Interfaces.PartialRelativeSensor"); |
|---|
| 669 | convertClass("Modelica.Mechanics.Rotational.GearEfficiency", |
|---|
| 670 | "ObsoleteModelica3.Mechanics.Rotational.GearEfficiency"); |
|---|
| 671 | convertClass("Modelica.Mechanics.Rotational.Gear", |
|---|
| 672 | "ObsoleteModelica3.Mechanics.Rotational.Gear"); |
|---|
| 673 | convertClass("Modelica.Mechanics.Rotational.Gear2", |
|---|
| 674 | "Modelica.Mechanics.Rotational.Gearbox"); |
|---|
| 675 | |
|---|
| 676 | |
|---|
| 677 | // bearing -> support |
|---|
| 678 | convertElement({"Modelica.Mechanics.Rotational.IdealGear", |
|---|
| 679 | "Modelica.Mechanics.Rotational.BearingFriction", |
|---|
| 680 | "Modelica.Mechanics.Rotational.Brake", |
|---|
| 681 | "Modelica.Mechanics.Rotational.LossyGear", |
|---|
| 682 | "Modelica.Mechanics.Rotational.Gear2", |
|---|
| 683 | "Modelica.Mechanics.Rotational.Position", |
|---|
| 684 | "Modelica.Mechanics.Rotational.Speed", |
|---|
| 685 | "Modelica.Mechanics.Rotational.Accelerate", |
|---|
| 686 | "Modelica.Mechanics.Rotational.Move", |
|---|
| 687 | "Modelica.Mechanics.Rotational.Torque", |
|---|
| 688 | "Modelica.Mechanics.Rotational.LinearSpeedDependentTorque", |
|---|
| 689 | "Modelica.Mechanics.Rotational.QuadraticSpeedDependentTorque", |
|---|
| 690 | "Modelica.Mechanics.Rotational.ConstantTorque", |
|---|
| 691 | "Modelica.Mechanics.Rotational.ConstantSpeed", |
|---|
| 692 | "Modelica.Mechanics.Rotational.TorqueStep"}, |
|---|
| 693 | "bearing", "support"); |
|---|
| 694 | |
|---|
| 695 | // bearingR -> supportR |
|---|
| 696 | convertElement({"Modelica.Mechanics.Rotational.IdealGearR2T"}, |
|---|
| 697 | "bearingR", "supportR"); |
|---|
| 698 | |
|---|
| 699 | // tau_support -> support.tau |
|---|
| 700 | convertElement({"Modelica.Mechanics.Rotational.IdealGear", |
|---|
| 701 | "Modelica.Mechanics.Rotational.IdealGearR2T", |
|---|
| 702 | "Modelica.Mechanics.Rotational.BearingFriction", |
|---|
| 703 | "Modelica.Mechanics.Rotational.Brake", |
|---|
| 704 | "Modelica.Mechanics.Rotational.LossyGear", |
|---|
| 705 | "Modelica.Mechanics.Rotational.Gear2", |
|---|
| 706 | "Modelica.Mechanics.Rotational.Position", |
|---|
| 707 | "Modelica.Mechanics.Rotational.Speed", |
|---|
| 708 | "Modelica.Mechanics.Rotational.Accelerate", |
|---|
| 709 | "Modelica.Mechanics.Rotational.Move", |
|---|
| 710 | "Modelica.Mechanics.Rotational.Torque", |
|---|
| 711 | "Modelica.Mechanics.Rotational.LinearSpeedDependentTorque", |
|---|
| 712 | "Modelica.Mechanics.Rotational.QuadraticSpeedDependentTorque", |
|---|
| 713 | "Modelica.Mechanics.Rotational.ConstantTorque", |
|---|
| 714 | "Modelica.Mechanics.Rotational.ConstantSpeed", |
|---|
| 715 | "Modelica.Mechanics.Rotational.TorqueStep"}, |
|---|
| 716 | "tau_support", "support.tau"); |
|---|
| 717 | |
|---|
| 718 | // flange_a -> flange |
|---|
| 719 | convertElement({"Modelica.Mechanics.Rotational.Sensors.AngleSensor", |
|---|
| 720 | "Modelica.Mechanics.Rotational.Sensors.SpeedSensor", |
|---|
| 721 | "Modelica.Mechanics.Rotational.Sensors.AccSensor"}, |
|---|
| 722 | "flange_a", "flange"); |
|---|
| 723 | |
|---|
| 724 | // flange_b -> flange |
|---|
| 725 | convertElement({"Modelica.Mechanics.Rotational.Fixed", |
|---|
| 726 | "Modelica.Mechanics.Rotational.Position", |
|---|
| 727 | "Modelica.Mechanics.Rotational.Speed", |
|---|
| 728 | "Modelica.Mechanics.Rotational.Accelerate", |
|---|
| 729 | "Modelica.Mechanics.Rotational.Move", |
|---|
| 730 | "Modelica.Mechanics.Rotational.Torque"}, |
|---|
| 731 | "flange_b", "flange"); |
|---|
| 732 | |
|---|
| 733 | |
|---|
| 734 | // if bearing is connected, set explicitly useSupport=true |
|---|
| 735 | convertModifiers({"Modelica.Mechanics.Rotational.IdealGear", |
|---|
| 736 | "Modelica.Mechanics.Rotational.BearingFriction", |
|---|
| 737 | "Modelica.Mechanics.Rotational.Brake", |
|---|
| 738 | "Modelica.Mechanics.Rotational.LossyGear", |
|---|
| 739 | "Modelica.Mechanics.Rotational.Gear2", |
|---|
| 740 | "Modelica.Mechanics.Rotational.Position", |
|---|
| 741 | "Modelica.Mechanics.Rotational.Speed", |
|---|
| 742 | "Modelica.Mechanics.Rotational.Accelerate", |
|---|
| 743 | "Modelica.Mechanics.Rotational.Move", |
|---|
| 744 | "Modelica.Mechanics.Rotational.Torque", |
|---|
| 745 | "Modelica.Mechanics.Rotational.LinearSpeedDependentTorque", |
|---|
| 746 | "Modelica.Mechanics.Rotational.QuadraticSpeedDependentTorque", |
|---|
| 747 | "Modelica.Mechanics.Rotational.ConstantTorque", |
|---|
| 748 | "Modelica.Mechanics.Rotational.ConstantSpeed", |
|---|
| 749 | "Modelica.Mechanics.Rotational.TorqueStep"}, |
|---|
| 750 | {"cardinality(bearing)=1"},{"useSupport=true"}); |
|---|
| 751 | |
|---|
| 752 | convertModifiers({"Modelica.Mechanics.Rotational.IdealGearR2T"}, |
|---|
| 753 | {"cardinality(bearingR)=1"},{"useSupportR=true"}); |
|---|
| 754 | |
|---|
| 755 | convertModifiers({"Modelica.Mechanics.Rotational.IdealGearR2T"}, |
|---|
| 756 | {"cardinality(bearingT)=1"},{"useSupportT=true"}); |
|---|
| 757 | |
|---|
| 758 | |
|---|
| 759 | // if bearing is not connected, set explicitly useSupport=false |
|---|
| 760 | convertModifiers({"Modelica.Mechanics.Rotational.IdealGear", |
|---|
| 761 | "Modelica.Mechanics.Rotational.BearingFriction", |
|---|
| 762 | "Modelica.Mechanics.Rotational.Brake", |
|---|
| 763 | "Modelica.Mechanics.Rotational.LossyGear", |
|---|
| 764 | "Modelica.Mechanics.Rotational.Gear2", |
|---|
| 765 | "Modelica.Mechanics.Rotational.Position", |
|---|
| 766 | "Modelica.Mechanics.Rotational.Speed", |
|---|
| 767 | "Modelica.Mechanics.Rotational.Accelerate", |
|---|
| 768 | "Modelica.Mechanics.Rotational.Move", |
|---|
| 769 | "Modelica.Mechanics.Rotational.Torque", |
|---|
| 770 | "Modelica.Mechanics.Rotational.LinearSpeedDependentTorque", |
|---|
| 771 | "Modelica.Mechanics.Rotational.QuadraticSpeedDependentTorque", |
|---|
| 772 | "Modelica.Mechanics.Rotational.ConstantTorque", |
|---|
| 773 | "Modelica.Mechanics.Rotational.ConstantSpeed", |
|---|
| 774 | "Modelica.Mechanics.Rotational.TorqueStep"}, |
|---|
| 775 | {"cardinality(bearing)=0"},{"useSupport=false"}); |
|---|
| 776 | |
|---|
| 777 | convertModifiers({"Modelica.Mechanics.Rotational.IdealGearR2T"}, |
|---|
| 778 | {"cardinality(bearingR)=0"},{"useSupportR=false"}); |
|---|
| 779 | |
|---|
| 780 | convertModifiers({"Modelica.Mechanics.Rotational.IdealGearR2T"}, |
|---|
| 781 | {"cardinality(bearingT)=0"},{"useSupportT=false"}); |
|---|
| 782 | |
|---|
| 783 | |
|---|
| 784 | // --------- MultiBody ----------------------------------------------------------- |
|---|
| 785 | |
|---|
| 786 | |
|---|
| 787 | convertModifiers("Modelica.Mechanics.MultiBody.World",{"driveTrainMechanics3D=false"}, {"driveTrainMechanics3D=%driveTrainMechanics3D%"}); |
|---|
| 788 | |
|---|
| 789 | // Forces |
|---|
| 790 | convertClass ("Modelica.Mechanics.MultiBody.Forces.WorldForceAndTorque", |
|---|
| 791 | "ObsoleteModelica3.Mechanics.MultiBody.Forces.WorldForceAndTorque"); |
|---|
| 792 | |
|---|
| 793 | convertClass ("Modelica.Mechanics.MultiBody.Forces.FrameForce", |
|---|
| 794 | "Modelica.Mechanics.MultiBody.Forces.WorldForce"); |
|---|
| 795 | convertModifiers({"Modelica.Mechanics.MultiBody.Forces.FrameForce"}, |
|---|
| 796 | {"cardinality(frame_resolve)=0"}, |
|---|
| 797 | {"resolveInFrame = Modelica.Mechanics.MultiBody.Types.ResolveInFrameB.frame_b"}, true); |
|---|
| 798 | convertModifiers({"Modelica.Mechanics.MultiBody.Forces.FrameForce"}, |
|---|
| 799 | {"cardinality(frame_resolve)=1"}, |
|---|
| 800 | {"resolveInFrame = Modelica.Mechanics.MultiBody.Types.ResolveInFrameB.frame_resolve"}, true); |
|---|
| 801 | |
|---|
| 802 | convertClass ("Modelica.Mechanics.MultiBody.Forces.FrameTorque", |
|---|
| 803 | "Modelica.Mechanics.MultiBody.Forces.WorldTorque"); |
|---|
| 804 | convertModifiers({"Modelica.Mechanics.MultiBody.Forces.FrameTorque"}, |
|---|
| 805 | {"cardinality(frame_resolve)=0"}, |
|---|
| 806 | {"resolveInFrame = Modelica.Mechanics.MultiBody.Types.ResolveInFrameB.frame_b"}, true); |
|---|
| 807 | convertModifiers({"Modelica.Mechanics.MultiBody.Forces.FrameTorque"}, |
|---|
| 808 | {"cardinality(frame_resolve)=1"}, |
|---|
| 809 | {"resolveInFrame = Modelica.Mechanics.MultiBody.Types.ResolveInFrameB.frame_resolve"}, true); |
|---|
| 810 | |
|---|
| 811 | convertClass ("Modelica.Mechanics.MultiBody.Forces.FrameForceAndTorque", |
|---|
| 812 | "ObsoleteModelica3.Mechanics.MultiBody.Forces.FrameForceAndTorque"); |
|---|
| 813 | |
|---|
| 814 | convertModifiers({"Modelica.Mechanics.MultiBody.Forces.Force"}, |
|---|
| 815 | {"cardinality(frame_resolve)=0"}, |
|---|
| 816 | {"resolveInFrame = Modelica.Mechanics.MultiBody.Types.ResolveInFrameAB.frame_b"}, true); |
|---|
| 817 | convertModifiers({"Modelica.Mechanics.MultiBody.Forces.Force"}, |
|---|
| 818 | {"cardinality(frame_resolve)=1"}, |
|---|
| 819 | {"resolveInFrame = Modelica.Mechanics.MultiBody.Types.ResolveInFrameAB.frame_resolve"}, true); |
|---|
| 820 | |
|---|
| 821 | convertModifiers({"Modelica.Mechanics.MultiBody.Forces.Torque"}, |
|---|
| 822 | {"cardinality(frame_resolve)=0"}, |
|---|
| 823 | {"resolveInFrame = Modelica.Mechanics.MultiBody.Types.ResolveInFrameAB.frame_b"}, true); |
|---|
| 824 | convertModifiers({"Modelica.Mechanics.MultiBody.Forces.Torque"}, |
|---|
| 825 | {"cardinality(frame_resolve)=1"}, |
|---|
| 826 | {"resolveInFrame = Modelica.Mechanics.MultiBody.Types.ResolveInFrameAB.frame_resolve"}, true); |
|---|
| 827 | |
|---|
| 828 | convertClass ("Modelica.Mechanics.MultiBody.Forces.ForceAndTorque", |
|---|
| 829 | "ObsoleteModelica3.Mechanics.MultiBody.Forces.ForceAndTorque"); |
|---|
| 830 | |
|---|
| 831 | |
|---|
| 832 | // Joints |
|---|
| 833 | convertClassIf("Modelica.Mechanics.MultiBody.Joints.Revolute","planarCutJoint","false", |
|---|
| 834 | "Modelica.Mechanics.MultiBody.Joints.Revolute"); |
|---|
| 835 | convertClassIf("Modelica.Mechanics.MultiBody.Joints.Revolute","planarCutJoint","true", |
|---|
| 836 | "Modelica.Mechanics.MultiBody.Joints.RevolutePlanarLoopConstraint"); |
|---|
| 837 | |
|---|
| 838 | convertElement({"Modelica.Mechanics.MultiBody.Joints.ActuatedRevolute"}, |
|---|
| 839 | "bearing", "support"); |
|---|
| 840 | convertClass ("Modelica.Mechanics.MultiBody.Joints.ActuatedRevolute", |
|---|
| 841 | "Modelica.Mechanics.MultiBody.Joints.Revolute"); |
|---|
| 842 | convertClassIf("Modelica.Mechanics.MultiBody.Joints.ActuatedRevolute","planarCutJoint","true", |
|---|
| 843 | "Modelica.Mechanics.MultiBody.Joints.RevolutePlanarLoopConstraint"); |
|---|
| 844 | convertModifiers({"Modelica.Mechanics.MultiBody.Joints.ActuatedRevolute"}, |
|---|
| 845 | {"cardinality(axis)=1"},{"useAxisFlange=true"}); |
|---|
| 846 | convertModifiers({"Modelica.Mechanics.MultiBody.Joints.ActuatedRevolute"}, |
|---|
| 847 | {"cardinality(bearing)=1"},{"useAxisFlange=true"}); |
|---|
| 848 | |
|---|
| 849 | |
|---|
| 850 | convertClass ("Modelica.Mechanics.MultiBody.Joints.ActuatedPrismatic", |
|---|
| 851 | "Modelica.Mechanics.MultiBody.Joints.Prismatic"); |
|---|
| 852 | convertElement ({"Modelica.Mechanics.MultiBody.Joints.ActuatedPrismatic"}, |
|---|
| 853 | "bearing", "support"); |
|---|
| 854 | convertModifiers({"Modelica.Mechanics.MultiBody.Joints.ActuatedPrismatic"}, |
|---|
| 855 | {"cardinality(axis)=1"},{"useAxisFlange=true"}); |
|---|
| 856 | convertModifiers({"Modelica.Mechanics.MultiBody.Joints.ActuatedPrismatic"}, |
|---|
| 857 | {"cardinality(bearing)=1"},{"useAxisFlange=true"}); |
|---|
| 858 | |
|---|
| 859 | convertClassIf("Modelica.Mechanics.MultiBody.Joints.Internal.RevoluteWithLengthConstraint","axisTorqueBalance","false", |
|---|
| 860 | "Modelica.Mechanics.MultiBody.Joints.Internal.RevoluteWithLengthConstraint"); |
|---|
| 861 | convertClassIf("Modelica.Mechanics.MultiBody.Joints.Internal.RevoluteWithLengthConstraint","axisTorqueBalance","true", |
|---|
| 862 | "ObsoleteModelica3.Mechanics.MultiBody.Joints.Internal.RevoluteWithLengthConstraint"); |
|---|
| 863 | convertClass ("Modelica.Mechanics.MultiBody.Joints.Internal.RevoluteWithLengthConstraint", |
|---|
| 864 | "ObsoleteModelica3.Mechanics.MultiBody.Joints.Internal.RevoluteWithLengthConstraint"); |
|---|
| 865 | convertClassIf("Modelica.Mechanics.MultiBody.Joints.Internal.PrismaticWithLengthConstraint","axisForceBalance","false", |
|---|
| 866 | "Modelica.Mechanics.MultiBody.Joints.Internal.PrismaticWithLengthConstraint"); |
|---|
| 867 | convertClassIf("Modelica.Mechanics.MultiBody.Joints.Internal.PrismaticWithLengthConstraint","axisForceBalance","true", |
|---|
| 868 | "ObsoleteModelica3.Mechanics.MultiBody.Joints.Internal.PrismaticWithLengthConstraint"); |
|---|
| 869 | convertClass ("Modelica.Mechanics.MultiBody.Joints.Internal.PrismaticWithLengthConstraint", |
|---|
| 870 | "ObsoleteModelica3.Mechanics.MultiBody.Joints.Internal.PrismaticWithLengthConstraint"); |
|---|
| 871 | |
|---|
| 872 | |
|---|
| 873 | // Sensors |
|---|
| 874 | convertModifiers({"Modelica.Mechanics.MultiBody.Sensors.CutForce"}, |
|---|
| 875 | {"cardinality(frame_resolve)=0", "resolveInFrame_a=true"}, |
|---|
| 876 | {"resolveInFrame = if (%resolveInFrame_a%) then " + |
|---|
| 877 | "Modelica.Mechanics.MultiBody.Types.ResolveInFrameA.frame_a else " + |
|---|
| 878 | "Modelica.Mechanics.MultiBody.Types.ResolveInFrameA.world"}, true); |
|---|
| 879 | convertModifiers({"Modelica.Mechanics.MultiBody.Sensors.CutForce"}, |
|---|
| 880 | {"cardinality(frame_resolve)=1"},{"resolveInFrame=Modelica.Mechanics.MultiBody.Types.ResolveInFrameA.frame_resolve"}); |
|---|
| 881 | |
|---|
| 882 | convertModifiers({"Modelica.Mechanics.MultiBody.Sensors.CutTorque"}, |
|---|
| 883 | {"cardinality(frame_resolve)=0", "resolveInFrame_a=true"}, |
|---|
| 884 | {"resolveInFrame = if (%resolveInFrame_a%) then " + |
|---|
| 885 | "Modelica.Mechanics.MultiBody.Types.ResolveInFrameA.frame_a else " + |
|---|
| 886 | "Modelica.Mechanics.MultiBody.Types.ResolveInFrameA.world"}, true); |
|---|
| 887 | convertModifiers({"Modelica.Mechanics.MultiBody.Sensors.CutTorque"}, |
|---|
| 888 | {"cardinality(frame_resolve)=1"},{"resolveInFrame=Modelica.Mechanics.MultiBody.Types.ResolveInFrameA.frame_resolve"}); |
|---|
| 889 | |
|---|
| 890 | convertClass ("Modelica.Mechanics.MultiBody.Sensors.CutForceAndTorque", |
|---|
| 891 | "ObsoleteModelica3.Mechanics.MultiBody.Sensors.CutForceAndTorque"); |
|---|
| 892 | |
|---|
| 893 | |
|---|
| 894 | |
|---|
| 895 | //-------- Electrical ------------------------------------------------------------ |
|---|
| 896 | convertElement({"Modelica.Electrical.Analog.Basic.EMF"}, "flange_b", "flange"); |
|---|
| 897 | |
|---|
| 898 | convertClass ("Modelica.Electrical.Analog.Basic.HeatingResistor", |
|---|
| 899 | "ObsoleteModelica3.Electrical.Analog.Basic.HeatingResistor"); |
|---|
| 900 | convertClassIf("Modelica.Electrical.Analog.Basic.HeatingResistor", "heatPort", "connect", |
|---|
| 901 | "Modelica.Electrical.Analog.Basic.HeatingResistor"); |
|---|
| 902 | |
|---|
| 903 | |
|---|
| 904 | //-------- Machines ------------------------------------------------------------ |
|---|
| 905 | // Convert Machines to 2.0.0 (MSL 3.0) |
|---|
| 906 | // Revisions : |
|---|
| 907 | // 2007/10/15: Anton Haumer |
|---|
| 908 | // first version |
|---|
| 909 | // 2007/10/20: Anton Haumer |
|---|
| 910 | // extended version |
|---|
| 911 | |
|---|
| 912 | convertClass ("Modelica.Electrical.Machines.Examples.Utilities", "Modelica.Electrical.Machines.Utilities"); |
|---|
| 913 | |
|---|
| 914 | convertClass ("Modelica.Electrical.Machines.BasicMachines.SynchronousInductionMachines.SM_PermanentMagnetDamperCage", |
|---|
| 915 | "Modelica.Electrical.Machines.BasicMachines.SynchronousInductionMachines.SM_PermanentMagnet"); |
|---|
| 916 | convertClass ("Modelica.Electrical.Machines.BasicMachines.SynchronousInductionMachines.SM_ElectricalExcitedDamperCage", |
|---|
| 917 | "Modelica.Electrical.Machines.BasicMachines.SynchronousInductionMachines.SM_ElectricalExcited"); |
|---|
| 918 | convertClass ("Modelica.Electrical.Machines.BasicMachines.SynchronousInductionMachines.SM_ReluctanceRotorDamperCage", |
|---|
| 919 | "Modelica.Electrical.Machines.BasicMachines.SynchronousInductionMachines.SM_ReluctanceRotor"); |
|---|
| 920 | |
|---|
| 921 | convertClass ("Modelica.Electrical.Machines.Sensors.RotorAngle", "Modelica.Electrical.Machines.Sensors.RotorDisplacementAngle"); |
|---|
| 922 | convertClass ("Modelica.Electrical.Machines.Sensors.VoltageRMSsensor", "Modelica.Electrical.Machines.Sensors.VoltageQuasiRMSSensor"); |
|---|
| 923 | convertClass ("Modelica.Electrical.Machines.Sensors.CurrentRMSsensor", "Modelica.Electrical.Machines.Sensors.CurrentQuasiRMSSensor"); |
|---|
| 924 | |
|---|
| 925 | convertElement({"Modelica.Electrical.Machines.Examples.Utilities.SwitchYD"}, |
|---|
| 926 | "plug_NS", "plug_sn"); |
|---|
| 927 | convertElement({"Modelica.Electrical.Machines.Examples.Utilities.SwitchYD"}, |
|---|
| 928 | "pug_PS", "plug_sp"); |
|---|
| 929 | convertElement({"Modelica.Electrical.Machines.Examples.Utilities.SwitchYD"}, |
|---|
| 930 | "plug_P", "plugSupply"); |
|---|
| 931 | |
|---|
| 932 | convertElement({"Modelica.Electrical.Machines.Examples.Utilities.TerminalBox"}, |
|---|
| 933 | "StarDelta", "terminalConnection"); |
|---|
| 934 | |
|---|
| 935 | convertElement({"Modelica.Electrical.Machines.Examples.Utilities.TerminalBox"}, |
|---|
| 936 | "negativeMachinePlug", "plug_sn"); |
|---|
| 937 | convertElement({"Modelica.Electrical.Machines.Examples.Utilities.TerminalBox"}, |
|---|
| 938 | "positiveMachinePlug", "plug_sp"); |
|---|
| 939 | convertElement({"Modelica.Electrical.Machines.Examples.Utilities.TerminalBox"}, |
|---|
| 940 | "plugToGrid", "plugSupply"); |
|---|
| 941 | |
|---|
| 942 | convertElement({"Modelica.Electrical.Machines.Interfaces.PartialBasicInductionMachine", |
|---|
| 943 | "Modelica.Electrical.Machines.BasicMachines.AsynchronousInductionMachines.AIM_SquirrelCage", |
|---|
| 944 | "Modelica.Electrical.Machines.BasicMachines.AsynchronousInductionMachines.AIM_SlipRing", |
|---|
| 945 | "Modelica.Electrical.Machines.BasicMachines.SynchronousInductionMachines.SM_PermanentMagnetDamperCage", |
|---|
| 946 | "Modelica.Electrical.Machines.BasicMachines.SynchronousInductionMachines.SM_ElectricalExcitedDamperCage", |
|---|
| 947 | "Modelica.Electrical.Machines.BasicMachines.SynchronousInductionMachines.SM_ReluctanceRotorDamperCage"}, |
|---|
| 948 | "fNominal", "fsNominal"); |
|---|
| 949 | |
|---|
| 950 | convertElement({"Modelica.Electrical.Machines.BasicMachines.AsynchronousInductionMachines.AIM_SlipRing"}, |
|---|
| 951 | "VsNom", "VsNominal"); |
|---|
|
|---|