CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Help linking icoFoam and ODE solvers

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 18, 2007, 07:13
Default Hi, What would be the best
  #1
Senior Member
 
Senthil Kabilan
Join Date: Mar 2009
Posts: 113
Rep Power: 17
skabilan is on a distinguished road
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
skabilan is offline   Reply With Quote

Old   February 19, 2008, 17:48
Default Hi, did you manage to do that?
  #2
New Member
 
Bernardo D Flores
Join Date: Mar 2009
Posts: 21
Rep Power: 17
david_flo1 is on a distinguished road
Hi, did you manage to do that?

I am looking the same problem here. Got any suggestions?

Cheers
david_flo1 is offline   Reply With Quote

Old   February 23, 2008, 01:24
Default Hi, I was able to integrate
  #3
Senior Member
 
Senthil Kabilan
Join Date: Mar 2009
Posts: 113
Rep Power: 17
skabilan is on a distinguished road
Hi,

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
skabilan is offline   Reply With Quote

Old   February 25, 2008, 13:15
Default Forgive my persistence but alt
  #4
New Member
 
Bernardo D Flores
Join Date: Mar 2009
Posts: 21
Rep Power: 17
david_flo1 is on a distinguished road
Forgive 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
david_flo1 is offline   Reply With Quote

Old   February 25, 2008, 14:02
Default Hi Bernardo, Take a look at
  #5
Senior Member
 
Senthil Kabilan
Join Date: Mar 2009
Posts: 113
Rep Power: 17
skabilan is on a distinguished road
Hi 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
skabilan is offline   Reply With Quote

Old   February 26, 2008, 11:18
Default Ok, I'll try it then. Maybe bo
  #6
New Member
 
Bernardo D Flores
Join Date: Mar 2009
Posts: 21
Rep Power: 17
david_flo1 is on a distinguished road
Ok, I'll try it then. Maybe bother you later along the way with some other question :D

thanks Senthil

Bernardo
david_flo1 is offline   Reply With Quote

Old   January 6, 2009, 06:33
Default Hello All, A new question,
  #7
Senior Member
 
Mark Couwenberg
Join Date: Mar 2009
Location: Netherlands
Posts: 130
Rep Power: 17
markc is on a distinguished road
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
markc is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Density in icoFoam Densidad en icoFoam manuel OpenFOAM Running, Solving & CFD 8 September 22, 2010 05:10
linking several faces Christian F. FLUENT 1 June 6, 2008 07:29
Linking two meshes Geoffroy Chaussonnet FLUENT 3 April 6, 2007 05:59
Linking fortran and c vasanth Main CFD Forum 3 January 29, 2005 13:38
linking the script Mavinakere FLUENT 0 September 12, 2002 12:57


All times are GMT -4. The time now is 07:35.