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

mapFields - only internalFields

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

LinkBack Thread Tools Search this Thread Display Modes
Old   September 13, 2022, 11:43
Default mapFields - only internalFields
New Member
Join Date: Dec 2020
Posts: 2
Rep Power: 0
MaxxiKing is on a distinguished road
Hello everyone,

I try to map the fields from a chtMultiRegionSimpleFoam case to a new chtMultiRegionSimpleFoam case with other boundary conditions.

Therefore I run the command:
mapFields {source_workdir} -case {workdir} -sourceTime '{latest_time}' -sourceRegion {source_region} -targetRegion {target_region} -consistent
But after running mapFields, the boundary conditions in the {workdir} are overwritten by the boundary conditions of the {source_workdir}.

I have tried to map only the internalField with the help of this post (using a mapFieldsDict with empty patchMap and cuttingPatches), but the boundary conditions are still overwritten.

Does anyone know how to map only the internalFields?

Thank you very much!

I am using openFoam Version 2206
MaxxiKing is offline   Reply With Quote

Old   September 16, 2022, 06:10
New Member
Join Date: Dec 2020
Posts: 2
Rep Power: 0
MaxxiKing is on a distinguished road
I found a solution:
  1. map the fields
  2. convert each region from binary to ascii with
    foamDictionary {case_dir}/system/controlDict -entry writeFormat -set ascii
    foamFormatConvert -region {region}
  3. update the boundary conditions with foamDictionary with e.g.:
    'foamDictionary {case_dir}/0/{region}/T -entry "boundaryField/{patch}/h" -set "uniform 25.0"'
    to set h in externalWallHeatFluxTemperature:

            type            externalWallHeatFluxTemperature;
            mode            coefficient;
            Ta              uniform 268.15;
            h               uniform 25;
            kappaMethod     solidThermo;
            value           nonuniform List<scalar> 
  4. convert from ascii to binary with

    foamDictionary {case_dir}/system/controlDict -entry writeFormat -set binary
    foamFormatConvert -region {region}
MaxxiKing is offline   Reply With Quote


internalfield, mapfields

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
running mapFields in parallel mkhm OpenFOAM Pre-Processing 10 September 16, 2021 14:12
mapFields & mapFieldsPar decompose cases otaolafr OpenFOAM Pre-Processing 2 August 26, 2021 14:13
Personalization of mapFields and libsampling - Compilation issues saimat OpenFOAM Programming & Development 3 June 29, 2016 09:56
Strange random behaviour of mapFields blaise OpenFOAM Pre-Processing 0 November 3, 2014 10:37
The -parallel parameter of mapFields utility in OpenFOAM v2.3.0 shuoxue OpenFOAM Pre-Processing 1 April 28, 2014 06:59

All times are GMT -4. The time now is 14:15.