CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

mapFields - only internalFields

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By MaxxiKing

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 13, 2022, 11:43
Default mapFields - only internalFields
  #1
New Member
 
Österreich
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:
Code:
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
Default
  #2
New Member
 
Österreich
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
    Code:
    foamDictionary {case_dir}/system/controlDict -entry writeFormat -set ascii
    foamFormatConvert -region {region}
  3. update the boundary conditions with foamDictionary with e.g.:
    Code:
    'foamDictionary {case_dir}/0/{region}/T -entry "boundaryField/{patch}/h" -set "uniform 25.0"'
    to set h in externalWallHeatFluxTemperature:

    Code:
    boundaryField
    {
        a4ee84fced4c0414bbd71e87bf9631bc6
        {
            type            externalWallHeatFluxTemperature;
            mode            coefficient;
            Ta              uniform 268.15;
            h               uniform 25;
            kappaMethod     solidThermo;
            value           nonuniform List<scalar> 
            132
            (
            268.306
            ...
            )
            ;
       }
  4. convert from ascii to binary with

    Code:
    foamDictionary {case_dir}/system/controlDict -entry writeFormat -set binary
    foamFormatConvert -region {region}
Giwrgos K likes this.
MaxxiKing is offline   Reply With Quote

Old   February 1, 2024, 07:21
Default mappingFields maps the patches
  #3
New Member
 
Franco
Join Date: Nov 2020
Posts: 3
Rep Power: 6
fconcli is on a distinguished road
To avoid to map the fields you need a mapFieldsDict with an empty field "patchMap"... moreover, remove the "consistent" option when mapping.
fconcli is offline   Reply With Quote

Reply

Tags
internalfield, mapfields


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 11:58.