slow simulation - computation problems

Hello,
I'm simulating a tractor in combination with an implement. I'm using simscape multibody in combination with simscape hydraulics. In multibody the physical parts are modelled e.g. cylinders and in hydraulics I'm modelling the hydraulic pump and oil flow to and in the cylinders.
Everything seems to work. The problem is that the simulation computes very slow even though I already optimised the controllers for the cylinder position. Simulation time = 10s vs. computation time = more than an hour...
Any suggestions how to resolve this issue?
Many thanks in advance.

5 comentarios

Mario Malic
Mario Malic el 8 de En. de 2021
Editada: Mario Malic el 8 de En. de 2021
Computation time depends on the physics that you're modelling (linear/ non-linear material model, steady-state/transient analysis, interactions between fluid-structure), discretisations, time steps and many others. I can't share more than this, since I am not so experienced with fluid dynamics.
Ruben Hefele
Ruben Hefele el 8 de En. de 2021
Thanks. I'm using the variable step solver ode23t. It's actually the only one that works. This means I don't have any big choice to set less time steps. I checked the reasons in the solver profiler and it gives me a lot of zero crossing and solver resets. Especially when the position of the cylinders changes.
I think the settings for valves I'm using provoque part of the zero crossings, but changing the orifice area doesn't help.
There is an interaction between fluid-structure: The fluid provoques a force on the piston of the cylinder. That force moves the cylinder via a prismatic joint.
It's a transient analysis. Right now I try to set up the step response. Later on the position shall follow a certain input function (e. g. trapezoidal).
I'm not sure if if it's a linear/non-linear material model. Where can I check this?
Mario Malic
Mario Malic el 8 de En. de 2021
Checking the ode23t documentation, it doesn't solve for inertial forces, so your model is steady-state.
What was ment by fluid-structure interaction(FSI) is that the fluid forces will deform the structure, so it's no for FSI.
I think for fluids, linear/non-linear model is related to whether your flow is inviscid or viscid, former being linear.
If your geometry is simple, see Hagen-Poiseuille equation, maybe you can solve it analytically.
Ruben Hefele
Ruben Hefele el 10 de En. de 2021
ok, thanks for the comments. basically my model is inspired by the backhoe example. The only difference is that i want to use a central hydraulic pump and not two pressure sources in every cylinder.
In the backhoe example there is also used the ode23t solver and since the reference angles of the joints are modulated in this example, I think its also a transient analysis. Correct me please if I'm wrong there.
But I will take into consideration to solve the geometry analytically. This could be good approach.
Yifeng Tang
Yifeng Tang el 27 de Abr. de 2021
Hard to tell exactly what's going on without looking at the model itself, but I can try to offer a few guesses on what might be the issue, based on my past experience with hydraulics+multibody models.
1. solver settings: not necessarily the solver itself, but things like tolerances and zero-crossings. Take a look at this example from MATLAB Central, and try to replicate the solver settings in there.
2. initial conditions: it's rather difficult to know before hand if all the target states of the joints in the multibody model is consistent with the forces and positions in the hydraulic cylinders, and there is a good chance that they are not at the beginning. The gravity will then pull things downwards and if the hydraulic circuits and joints doesn't have enough damping components (resistance, orifice, friction), there can be high frequency vibrations that go on and on. The hydraulic circuit can behave like very stiff springs. The simulation can be very slow because of this. Now your simulation runs, but very slowly, you can check in the result explorer, zoom in, and see whether you see any high frequency vibrations. The mid point of the pressure in the cylinders usually gives you a some idea where the equilibrium should be and you can try to set the initial conditions accordingly.
3. Use solver profiler to identify the blocks that's forcing small time steps.

Iniciar sesión para comentar.

Respuestas (1)

Steve Miller
Steve Miller el 3 de Jun. de 2021

0 votos

There are many good suggestions in the comments.
Please note:
  1. Simulating with ode23t is a dynamic analysis, not steady state
  2. The Solver Profiler is an excellent tool for diagnosing model issues.
  3. Please refer to this MATLAB Answers post for additional suggestions to speed up your model https://www.mathworks.com/matlabcentral/answers/535318-why-is-my-model-made-of-simscape-and-simscape-multibody-simulating-very-slowly
If you can post the model, we can offer more suggestions.
--Steve

Productos

Versión

R2020b

Preguntada:

el 8 de En. de 2021

Respondida:

el 3 de Jun. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by