CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Initialization of internal field (https://www.cfd-online.com/Forums/openfoam/238130-initialization-internal-field.html)

jyj970522 August 25, 2021 04:05

Initialization of internal field
 
Dear all,


I am a beginner of OpenFOAM. What I am trying to do is


First, I run the simulation using 4m-length tube mesh.
Create a new tube mesh with same diameter but longer.(6m-length)
Copy the field values of result of 4m-tube simulation, to the 6m-length. Additional 2m is initialized any value that I want.


Currently, how I am doing this :


Copy the field value (at certain time step) from 1st simulation, and paste it to the 0 folder of longer tube. And then type in the values for all the cells of additional 2m.


When grid number becomes large, this is very time-consuming. There might be an easier way to do this. Any help will be appreciated. Thank you!

snak August 27, 2021 00:16

Hi,

There is a mapFields utility which maps one or more fields relating to a given geometry onto the corresponding fields for another geometry.
https://www.openfoam.com/documentati...ent-geometries

The official tutorial guide explains how to use the mapFileds utility.
https://www.openfoam.com/documentati...en-cavity-flow

jyj970522 August 27, 2021 04:18

Quote:

Originally Posted by snak (Post 811065)
Hi,

There is a mapFields utility which maps one or more fields relating to a given geometry onto the corresponding fields for another geometry.
https://www.openfoam.com/documentati...ent-geometries

The official tutorial guide explains how to use the mapFileds utility.
https://www.openfoam.com/documentati...en-cavity-flow


Thanks for the reply.

I will go through the links you provided.

Thanks again!


All times are GMT -4. The time now is 19:40.