CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Read boundary conditions from previously computed time steps or from file? (http://www.cfd-online.com/Forums/openfoam-solving/113174-read-boundary-conditions-previously-computed-time-steps-file.html)

cuba February 14, 2013 04:57

Read boundary conditions from previously computed time steps or from file?
 
Hi everyone,

I am using a modified version of pimpleDymFoam in OF-1.6-ext.

To explain the problem briefly, as an example,

from 0 to 2 seconds, I wait for the flow condition to reach its steady state, later,
for the next 10 seconds (from 2 - 12)
I want to make sure that the program reads the boundary conditions at the inlet for the velocity and some other parameters
from the folder created at the end of 2nd sec time step, where I assume that it has reached its steady state.

How can I define my boundary conditions at the inlet to be read from a file or a folder which is previously computed?

Thanks again in advance for your valuable comments and replies
Best

sushant February 14, 2013 06:34

Quote:

Originally Posted by cuba (Post 407745)
Hi everyone,

I am using a modified version of pimpleDymFoam in OF-1.6-ext.

To explain the problem briefly, as an example,

from 0 to 2 seconds, I wait for the flow condition to reach its steady state, later,
for the next 10 seconds (from 2 - 12)
I want to make sure that the program reads the boundary conditions at the inlet for the velocity and some other parameters
from the folder created at the end of 2nd sec time step, where I assume that it has reached its steady state.

How can I define my boundary conditions at the inlet to be read from a file or a folder which is previously computed?

Thanks again in advance for your valuable comments and replies
Best

Stop your simulation after 2 seconds, copy the files from 2/* to 0/* (backup your 0 folder if you want to; then overwrite it). Open the files that are now in 0/ and (scroll down a lot) change the velocity / other parameters at the desired boundaries to fixedValue from whatever they were before. The value will be a large nonuniform table, leave it untouched. Change the run time in controlDict and continue the run. I assume of course that the writeFormat in controlDict is ascii from the beginning of the run.

Or are you looking to automate this? PyFoam has a utility that will do the copying part elegantly for you.

If the mesh has changed between 0-2s, and you get errors while continuing, you may also need to copy from 2/polyMesh/* into constant/polyMesh (backup the original).

cuba February 14, 2013 08:48

Thanks for such a quick reply.. a very good idea indeed

then my second question is

how to output the values of some of the parameters at the inlet, which are defined as zeroGradient at 0th time.

because even for the 2nd time step, at the inlet, when I look at the boundaryField, I see the respective boundary condition defined as in 0, but not like a table with the values.

Thanks again


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