diff --git a/PlanarMechanics/GearComponents/RigidNoLossExternal.mo b/PlanarMechanics/GearComponents/RigidNoLossExternal.mo index 1cb67bda..5edbeef3 100644 --- a/PlanarMechanics/GearComponents/RigidNoLossExternal.mo +++ b/PlanarMechanics/GearComponents/RigidNoLossExternal.mo @@ -118,8 +118,9 @@ protected constant SI.Acceleration unitAcceleration=1; constant SI.Force unitForce=1; - SI.Angle phi_c_start; - + parameter SI.Angle phi_c_start(fixed=false); +initial equation + phi_c_start = phi_gear; equation lossPower = 0; @@ -133,9 +134,6 @@ equation Tooth_b = integer(Tooth_a/r_a*r_b); // ********* General set up ************** // set up the total traveled angle - when initial() then - phi_c_start = phi_gear; - end when; phi_c_total = phi_gear - phi_c_start; // Derivatives diff --git a/PlanarMechanics/GearComponents/RigidNoLossInternal.mo b/PlanarMechanics/GearComponents/RigidNoLossInternal.mo index 9a68f5bc..78e9fe4e 100644 --- a/PlanarMechanics/GearComponents/RigidNoLossInternal.mo +++ b/PlanarMechanics/GearComponents/RigidNoLossInternal.mo @@ -120,8 +120,9 @@ protected constant SI.Acceleration unitAcceleration=1; constant SI.Force unitForce=1; - SI.Angle phi_c_start; - + parameter SI.Angle phi_c_start(fixed=false); +initial equation + phi_c_start = phi_gear; equation lossPower = 0; Tooth_b = integer(Tooth_a/r_a*r_b); @@ -135,9 +136,6 @@ equation // ********* General set up ************** // set up the total traveled angle - when initial() then - phi_c_start = phi_gear; - end when; phi_c_total = phi_gear - phi_c_start; // Derivatives