Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

C code Export of model, Coupling with different integrator

C code Export of model, Coupling with different integrator

Dear everybody,

for a project we are trying to incorporate a model of a hydraulic element into a larger simulation.
The rest of the model was developed with a different software, which is unfortunately not able to cover the hydraulic behavior and just the mechanics of the remaining system.
What we are trying to do is use the c-code generate by OpenModelica and combine it with the integrator of the of the software in order to run it as a single, rather than a co-simulation of the components.
The problem with the other software is that it can't solve the differentials in our hydraulic element.
So we basically want the use the c-code from modelica to solve the for the Jacobian and then let the integrator of the other software solve for the next time-step.

Has anyone ever tried something similar?
How can I combine the c-code with a different integrator, which libraries and parts of the solver from OpenModelica  would I need to use?
Or can anyone tell me where in the code OpenModelica starts it's own integrator, i.e. where I'd need to alter the code to feed the data to a different integrator?

Thanks,

Fynn

Re: C code Export of model, Coupling with different integrator

Hey Fynn,

I am also stuck at the same problem and I want to generate C code from Modelica. Could you figure out how to do it?

There are 0 guests and 0 other users also viewing this topic
You are here: