CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Solving ODEs in OpenFOAM (http://www.cfd-online.com/Forums/openfoam/75196-solving-odes-openfoam.html)

WiWo April 19, 2010 07:50

Solving ODEs in OpenFOAM
 
Hi Foamers,

I'm having a quite unexpected difficulty at the moment. For the equations in my current solver I need to determine a single scalar parameter from a non-linear 2nd order ordinary differential equation (initial value problem) at every time step. This parameter does not belong to any field - it's just a number (on per time step) I need to plug into the solver.
Now it doesn't seem to be straight forward to solve an ODE (in my case I want to get the radius of a micro bubble from the Rayleigh-Plesset equation) for just this one parameter in OpenFOAM. Does OpenFOAM offer the capabilities of solving such ODEs?

I'd appreciate any help or advice.

Best,
Wolfgang

hjasak April 20, 2010 08:49

Yes, absolutely. We have the ODE library and ODE solvers. You can write your ODE as a derived class and use an ODE solver with it.

There is a relatively simple example in 1.5-dev under silvers/basic.

Good hunting,

Hrv

WiWo April 27, 2010 07:54

Dear Prof. Jasak,

The hunt was very successful - thank you very much for referencing me to the sixDOFSolver!

I was able to adapt the ODE solver and its dedicated classes to fit my needs. It was then pretty straight forward to include this package into my overall solver - all done, verified and working :-)

I recognized that there is quite a significant difference between the ODESolver class of OF-1.5-dev and OF-1.6. My first attempt was actually to work with the ODETest case (applications/test) in OF-1.5-dev, but it was evidently designed to work with the 1.6(.x)-version of ODESolver. What is the reason for this discrepancy?

Thank you for your help!

Best regards,
Wolfgang

Annier August 4, 2013 02:59

about the solution of rayleigh plesset equation
 
dear Wolfgang,
would you please guide me with the steps of solving the rayleigh plesset equation in OpenFOAM?
thanking you in advance.
annier


All times are GMT -4. The time now is 21:00.