|
[Sponsors] |
Issue: setFields in Multi-World OpenFOAM Simulation |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Matthias Lang
Join Date: Jun 2023
Location: Munich, Germany
Posts: 8
Rep Power: 3 ![]() |
Hi everyone,
I'm running a multi-region case in OpenFOAM using multi-world coupling to simulate a specialized casting process for a science project. My setup includes:
When executing setFields and running both regions as a multi-world case, the initialized fields do not persist. So on t=0 the fields are not initialized as I specified. However, everything works as expected when running the regions separately. I'm unsure what I might be overlooking. Has anyone encountered a similar issue before or found a better approach to initializing fields in multi-world cases? Any insights would be greatly appreciated! I've attached my case files and log files for reference. Notably, log.setFieldsMould.txt indicates that the first selection is empty. This also happens without coupling, and I haven't been able to determine the cause. I suspect it's something simple, but it may not be related to the main issue. Multi-World Documentation:
/usr/lib/openfoam/openfoam2312/tutorials/basic/laplacianFoam/multiWorld1 Thanks in advance! |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Matthias Lang
Join Date: Jun 2023
Location: Munich, Germany
Posts: 8
Rep Power: 3 ![]() |
In the top-level Allrun.pre script, restore0Dir is called after executing the bottom-level Allrun.pre script. This overwrites the setFields results.
Code:
0 #!/bin/sh 1 cd "${0%/*}" || exit # Run from this directory 2 . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions 3 #------------------------------------------------------------------------------ 4 5 # Create meshes and initial fields 6 for subcase in $(./list-worlds) 7 do 8 ( 9 cd "$subcase" || exit 10 echo "case=$subcase" 11 if [ -x ./Allrun.pre ] 12 then 13 ./Allrun.pre 14 else 15 runApplication blockMesh 16 fi 17 # restore0Dir 18 echo 19 ) 20 done 21 22 #------------------------------------------------------------------------------ Just in case anyone runs into the same issue when copying the tutorial files. |
|
![]() |
![]() |
![]() |
Tags |
multi domain, setfields |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Issues running LES simulation on custom geometry in OpenFOAM v12 | CarlosMH | OpenFOAM Running, Solving & CFD | 0 | November 2, 2024 11:14 |
OpenFOAM v2312 - Compressible Steady case - rhoSimpleFoam issue | CFD_SG_01 | OpenFOAM Running, Solving & CFD | 3 | August 26, 2024 09:53 |
How to keep an initial field created by setFields during the simulation | rafaelgabler | OpenFOAM Programming & Development | 6 | February 21, 2024 13:13 |
OpenFOAM v3.0+ ?? | SBusch | OpenFOAM | 22 | December 26, 2016 15:24 |
OpenFoam Airfoil simulation - replacing Fluent with OpenFOAM | shereez234 | OpenFOAM Running, Solving & CFD | 1 | November 3, 2015 04:54 |