CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Changing inlet conditions without starting again (https://www.cfd-online.com/Forums/openfoam-pre-processing/86730-changing-inlet-conditions-without-starting-again.html)

Conflate March 31, 2011 09:31

Changing inlet conditions without starting again
 
Hi,

I've ran a simulation for about 24 hours and I'd like to now change the inlet velocity slightly.

Is there a way to copy the internal fields from the old case but use the inlet conditions from "0" in the new case? It would speed up the convergence considerably.

I've tried using mapFields but it seems to always use the inlet velocity from the old case, and none of the pyFoam tools seem to be suitable.

In Ansys CFX I could tell the solver to initialize from a results file but it would take all the boundary conditions from the new case, that's exactly what I'm trying to do here.

Thanks,

Mitchell

alberto April 1, 2011 03:02

Quote:

Originally Posted by Conflate (Post 301681)
Hi,

I've ran a simulation for about 24 hours and I'd like to now change the inlet velocity slightly.

Is there a way to copy the internal fields from the old case but use the inlet conditions from "0" in the new case? It would speed up the convergence considerably.

I've tried using mapFields but it seems to always use the inlet velocity from the old case, and none of the pyFoam tools seem to be suitable.

Boundary conditions are specified in the boundaryField dictionary also in the results of you run. If you saved in ASCII format, you can simply copy/paste the corresponding boundary condition.

Best,

Conflate April 1, 2011 07:29

Thanks a lot, I was also having problems opening the results files but I changed the output format to ascii in controlDict, ran a couple more iterations, and now I can change the boundaryFields like you suggested.

Cheers,

Mitchell

gabrielfelix April 25, 2022 08:19

Quote:

Originally Posted by alberto (Post 301784)
Boundary conditions are specified in the boundaryField dictionary also in the results of you run. If you saved in ASCII format, you can simply copy/paste the corresponding boundary condition.

Best,

Thanks! It helped a lot. That is precisely would its needed to do. For those who dont know boundaryField is a field inside the files 0/U, 0/p, 0/nut for exemple in which there are the boundary conditions of each patch in your mesh such as: inlet, wall, outlet, etc.

I recommend editing those files with nano or vi. Just search for the patch you want (e.g inlet) and change the values.


All times are GMT -4. The time now is 13:36.