Skip to content

Fix slip calculation in DryFrictionWheelJoint#252

Open
juliusaka wants to merge 1 commit intodzimmer:masterfrom
juliusaka:patch-1
Open

Fix slip calculation in DryFrictionWheelJoint#252
juliusaka wants to merge 1 commit intodzimmer:masterfrom
juliusaka:patch-1

Conversation

@juliusaka
Copy link
Copy Markdown

The previous implementation lead to an error because of 1/sqrt(0) in Dymola 2025x using the dassl solver.

The previous implementation lead to an error because of 1/sqrt(0) in Dymola 2025x using the dassl solver.
@juliusaka
Copy link
Copy Markdown
Author

juliusaka commented Dec 9, 2025

We (@lmikelsons and me) did some more research about this. This isn't a problem due to 2025x, its about the analytic Jacobian calculation (which I turned on Dymola 2025x).

For the case with the 0.0001 outside the brackets of sqrt, within the Jacobian section we have

DYNX(DYNhelp,164) = sqrtGuarded(DYNX(DYNhelp,162)+DYNX(DYNhelp,163),

which can lead to a division by zero error:

Error: The following error was detected at time: 0.00018

Model error - division by zero: (1.0) / (sqrt(chassis.dryFrictionWheelJoint.v_slip_long^2+chassis.dryFrictionWheelJoint.v_slip_lat^2)) = (1) / (0)

With the 0.0001^2 inside the brackets, we get

DYNX(DYNhelp,164) = sqrtGuarded(1E-08+DYNX(DYNhelp,162)+DYNX(DYNhelp,163),

in the Jacobian section and the model runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant