-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented FreeWheel #4004
base: master
Are you sure you want to change the base?
Implemented FreeWheel #4004
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The new model is missing in ModelicaTest.Rotational.AllComponents.
- The new example misses the required file Modelica/Resources/Reference/Modelica/Mechanics/Rotational/Examples/DemoFreeWheel/comparisonSignals.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The new model is missing in ModelicaTest.Rotational.AllComponents.
- The new example misses the required file Modelica/Resources/Reference/Modelica/Mechanics/Rotational/Examples/DemoFreeWheel/comparisonSignals.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any reason to not extend from Modelica.Mechanics.Rotational.Interfaces.PartialCompliantWithRelativeStates
as e.g. Rotational.Components.Clutch
does?
…alCompliant Thus, the sign convention of phi_rel (and w_rel) established for "rotational" components is assured. Note: doing so, the sign of w_rel and tau changes - compared to the original implementation.
With 7e6f667, the freewheel extends now from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine for me now. Nice work!
|
Before implementing a change I would like to discuss the meaning of the parameters The current implementation is:
Hmmm.... the actual implementatioin is somehow avoiding the units that specify the slope of the two branches in the diagram. The diode models uses a. Creating the new units "Nm.s" and "1/(s.Nm)" may be one way to resolve this point. b. We could improve the description to better explain the meaning of @AHaumer @tobolar any ideas on how to resolve this "unit" issue? |
OK, possibly the unit |
To my understanding, the implementation is:
Hmm, the documentation says:
It seems this fits not well. |
@tobolar and @christiankral thanks for taking care!
|
@tobolar and @christiankral I think a have a sound solution (looks like a translation of the electrical diode):
|
@AHaumer , @christiankral I'm still stumbling about the two parameters. Using Regarding units - both |
@tobolar Would the following wording make it better on your opinion: parameter Real(final unit="rad/N/m/s") residualAngularVelocity =1e-5 "Residual angular velocity coefficient (free = false)";
...
w_rel = s*unitTorque *(if free then 1 else residualAngularVelocity); |
Sounds good. The following could be a reasonable implementation now:
The documentation shall be modified then:
Regarding the two equations for
but it seems to be strange since one could, in general, expect both friction and a coefficient being unitless. |
On my understanding the units of the proposed equations are not correct. They shall rather be: parameter residualFriction (unit="N.m.s")=1e-5 "Residual friction coefficient (if free = true)";
parameter residualAngularVelocity (unit="1/N/m/s")=1e-5 "Residual angular velocity coefficient (if free = false)";
w_rel = s*unitTorque * (if free then 1 else residualAngularVelocity);
tau = s*unitAngularVelocity * (if free then residualFriction else 1); Note, that I swaped |
@tobolar As we deal with torques (not forces) the units shall rather be |
Alternatively we could consider the unit parameter residualFriction (unit="N.m.s/rad")=1e-5 "Residual friction coefficient (if free = true)";
parameter residualAngularVelocity (unit="rad/N/m/s")=1e-5 "Residual angular velocity coefficient (if free = false)"; |
@christiankral
This is why I tend to have no units. Optionally, we schould think again of changing "residualFriction" name and description. Not sure if this also holds for |
Note that unitless can mean two different things:
To me the friction coefficient should be of the second kind for translational friction, but I notice that often in MSL it is of the first kind. (And it is generally not possible to deduce its unit because it appears as For rotational friction it is not clear to me if |
@HansOlsson Need to open a new issue? |
Possibly. You decide. |
@HansOlsson Is using |
As mentioned in #3977:
I see that we have a rather sophisticated Mechanics.Rotational.Components.OneWayClutch, but no simple ideal freewheel (like the Electrical.Analog.Ideal.Diode). We could introduce such a component for usage e.g. in bicycle models.