CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Mapping Field Data for Mesh Regions from Another Simulation

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

LinkBack Thread Tools Search this Thread Display Modes
Old   July 10, 2018, 04:55
Question Mapping Field Data for Mesh Regions from Another Simulation
New Member
Join Date: Oct 2015
Posts: 2
Rep Power: 0
veterator is on a distinguished road
Hi Everyone,

I am working on a quiet academic case but I got stuck: my goal is to simulate a single rising bubble (e.g. with interFoam) in decaying homogeneous, isotropic turbulence. The domain is a simple cubic block. The turbulence is calculated in a precursor simulation (also in a cubic block domain, fully periodic BCs and linear forcing, a mean velocity is applied with meanVelocityForce). So far this works fine.

My problem now is the following: I need to get the fully transient velocity data from the precursor simulation to "flow" into the inlet of the actual simulation. As this problem is still single phase everything from now on can be done with any incompressible solver, e.g. pimpleFoam.

I tried transferring the turbulence from a patch of the precursor simulation to the inlet patch of the actual simulation with timeVaryingFixedValueFvPatch. The transferred patch data are correct but it leads to heavy oscillations right after the inlet. So the turbulence is not transferred correctly. It seems that this problem cannot be tackled with boundary conditions only. (As this is a 2nd order method, I would need at least two layers of cell data to be transferred).

So I switched to a different approach: I transfer the velocity field data for every time step (very large amount of data!) from the precursor simulation to the actual simulation via mapFields and rename it: U -> Uturb. The latter is read in every single time loop in the actual simulation (yes, it takes some time). I add a forcing term to the momentum equation (rhs):

a\frac{U_{turb} - U}{\Delta t}


  + IFweight*Uturb/runTime.deltaT()
  - fvm::SuSp(IFweight/runTime.deltaT(), U);
where IFweight (a) is a volScalarField, which is (with setFields) set to 1 in the vicinity of the inlet and 0 elsewhere. This forces U to be nearly identical to Uturb in the selected region - so far so good.

I want to reduce the amount of data I have to save in the precursor simulation and I need to transfer. My idea was to create meshRegions/cellZones (what is the difference?) with topoSet (where IFweight is 1 at the moment) and to only map the velocity data for the part of the mesh. mapFields provides the options to select source- and targetRegion. I probably need topoSet for this. Do I need to splitMeshRegions for every single time step in the source (precursor) simulation and in the target (actual) simulation? Do I really have to change the startTime in controlDict for every time step I want to map (it may be done with sed -i). Is there any way to do that with standard OpenFOAM tools? Maybe with a limited amount of commands for all time steps or do I need to (bash) script this to loop over the time steps?

I hope, the description is clear enough. I appreciate your help.

Thanks, veterator

Both meshes may have different resolutions.

Last edited by veterator; July 10, 2018 at 07:14.
veterator is offline   Reply With Quote

Old   July 10, 2018, 05:28
New Member
Join Date: Oct 2015
Posts: 2
Rep Power: 0
veterator is on a distinguished road
Please, find a sketch of the problem attached.
Attached Images
File Type: png mapMeshRegions.png (153.9 KB, 149 views)
veterator is offline   Reply With Quote


mapfields, meshregions, transient

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
[OpenFOAM] How to get the coordinates of velocity data at all cells and at all times vidyadhar ParaView 9 May 20, 2020 20:06
[Other] dynamicTopoFVMesh and pointDisplacement RandomUser OpenFOAM Meshing & Mesh Conversion 6 April 26, 2018 07:30
mapping Data to internal field cyln OpenFOAM Running, Solving & CFD 1 April 10, 2018 05:19
Utility to export field data tbrycekelly OpenFOAM Post-Processing 0 July 13, 2016 10:42
simulation of plasma field Ralf Schmidt FLUENT 6 September 15, 2005 12:25

All times are GMT -4. The time now is 08:52.