- **OpenFOAM**
(*http://www.cfd-online.com/Forums/openfoam/*)

- - **Help linking icoFoam and ODE solvers **
(*http://www.cfd-online.com/Forums/openfoam/60718-help-linking-icofoam-ode-solvers.html*)

Hi,
What would be the best Hi,
What would be the best way to link icoFoam and a ODE solver? Basically what i want is: the ODE solver solves a set of equations and supplies the pressure at the outlets to icoFoam. Which then computes on the mesh. This should repeat after every time step (transient simulation). Thanks in advance for all your help! Warm Regards, Senthil |

Hi, did you manage to do that?Hi, did you manage to do that?
I am looking the same problem here. Got any suggestions? Cheers |

Hi,
I was able to integrateHi,
I was able to integrate the ODE solver in OF with icoFoam. Take a look at the /OpenFOAM-1.4.1/applications/test/ODETest. You can use the same driver with your ODE set to solve the equations. Senthil |

Forgive my persistence but altForgive my persistence but although after checking the ODE I kinda understand how it works, how to use available specific ODE solvers, yet it is not clear to me how to use its results for input on each time step on a FOAM fv solver.
I am a FOAM newbbie here, any more specific details, please, or an example if you don't mind. Regards |

Hi Bernardo,
Take a look atHi Bernardo,
Take a look at the timeVaryingUniformFixedValue patch in the directory /OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/fields/fvPatchFields/derived/ This patch is used for transient simulation.The patch reads the pressure value from a file (user specified) after every time step. You can insert the ODE solver in the patch and can supply the outlet condition to OF after every time step. Senthil |

Ok, I'll try it then. Maybe boOk, I'll try it then. Maybe bother you later along the way with some other question :D
thanks Senthil Bernardo |

Hello All,
A new question, Hello All,
A new question, basically a C++ question, with respect to implementing a ode solver. Starting from ODETest.C the following question: the derivatives are given in the member function derivatives, which is inherited from ODE.H. In ODETest the DE's are like: dydx[0] = -y[1]; dydx[1] = y[0] - (1.0/x)*y[1]; dydx[2] = y[1] - (2.0/x)*y[2]; dydx[3] = y[2] - (3.0/x)*y[3]; But now I want to add some extra parameters which are constants in the DE's. E.g. the above may look like: dydx[1] = y[0] - (constant_1 / x)*y[1]; (just an example). However I am not able to bring in constants like this because the ODETest class is inherited from ODE.H and there those variables are not declared. A possible workaround is to put the constants in the y vector and threat some components of the y vector as constants. However I do not think this is a nice way. Any hints how to perform this task? I am currently studying C++ but any help about this question would be appreciated. Thanks in advance, Mark |

All times are GMT -4. The time now is 09:12. |