Configuring a Solid-Solid-Fluid CHT case in OpenFOAM

  • my system:Ubuntu 20.04.4
  • preCICE:v2.4.0
  • OpenFOAM:v2006
  • OpenFOAM-adapter-v1.0.0
  • participants: fuel(solid) - cladding(solid) - coolant(liquid)

I don’t know how to set the 0/T folder type for the participant
OpenFOAM:cladding:'0’folder:“T”

FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 700;

boundaryField
{
    fuelwall
    {
        type            fixedGradient;
        gradient        uniform 0;
    }
    claddinginlet
    {
        type            zeroGradient;
    }
    claddingoutlet
    {
        type            zeroGradient;
    }
    claddingwall
    {
        type            fixedValue;
        value           $internalField;
    }
    
}

// ************************************************************************* //

log:

xie@xie-Z790-D:~/OpenFOAM/xie-v2006/run/tlk/CHT-Nuclear-couplling/222-fixgradient/cladding-openfoam$ mpirun -np 2 laplacianFoam -parallel |tee log
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2006                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : v2006 OPENFOAM=2006
Arch   : "LSB;label=32;scalar=64"
Exec   : laplacianFoam -parallel
Date   : Dec 07 2024
Time   : 15:33:20
Host   : xie-Z790-D
PID    : 837252
I/O    : uncollated
Case   : /home/xie/OpenFOAM/xie-v2006/run/tlk/CHT-Nuclear-couplling/222-fixgradient/cladding-openfoam
nProcs : 2
Hosts  :
(
    (xie-Z790-D 2)
)
Pstream initialized with:
    floatTransfer      : 0
    nProcsSimpleSum    : 0
    commsType          : nonBlocking
    polling iterations : 0
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 5, maxFileModificationPolls 20)
allowSystemOperations : Allowing user-supplied system call operations

Create time

Create mesh for time = 0


SIMPLE: no convergence criteria found. Calculations will run for 0.3 steps.

Reading field T

Reading diffusivity DT

No finite volume options present

Calculating temperature distribution

---[preciceAdapter] Loaded the OpenFOAM-preCICE adapter v1.0.0.
---[preciceAdapter] Reading preciceDict...
---[precice]  This is preCICE version 2.4.0
---[precice]  Revision info: no-info [Git failed/Not a repository]
---[precice]  Build type: Release (without debug log)
---[precice]  Configuring preCICE with configuration "../precice-config.xml"
---[precice]  I am participant "cladding"
---[precice]  Connecting Primary rank to 1 SecondaryRanks
---[precice]  Setting up primary communication to coupling partner/s
---[precice]  Primary ranks are connected
---[precice]  Setting up preliminary secondary communication to coupling partner/s
---[precice]  Prepare partition for mesh cladding-to-fuel-Mesh
---[precice]  Prepare partition for mesh cladding-to-liquid-Mesh
---[precice]  Gather mesh cladding-to-liquid-Mesh
---[precice]  Send global mesh cladding-to-liquid-Mesh
---[precice]  Receive global mesh fuel-Mesh
---[precice]  Receive global mesh liquid-Mesh
---[precice]  Broadcast mesh fuel-Mesh
---[precice]  Filter mesh fuel-Mesh by bounding box on secondary ranks
---[precice]  Mapping distance min:7.83971e-06 max:0.000249152 avg: 0.000126059 var: 5.17308e-09 cnt: 5040
---[precice]  Filter mesh fuel-Mesh by mappings
---[precice]  Feedback distribution for mesh fuel-Mesh
---[precice]  Broadcast mesh liquid-Mesh
---[precice]  Filter mesh liquid-Mesh by bounding box on secondary ranks
---[precice]  Mapping distance min:6.01013e-06 max:0.000249098 avg: 0.000125419 var: 5.11197e-09 cnt: 6280
---[precice]  Filter mesh liquid-Mesh by mappings
---[precice]  Feedback distribution for mesh liquid-Mesh
---[precice]  Setting up secondary communication to coupling partner/s
---[precice]  Secondary ranks are connected
---[precice]  liquid: iteration: 1, time-window: 1, time: 0 of 1, time-window-size: 0.0001, max-timestep-length: 0.0001, ongoing: yes, time-window-complete: no, write-initial-data 
fuel: iteration: 1, time-window: 1, time: 0 of 1, time-window-size: 0.0001, max-timestep-length: 0.0001, ongoing: yes, time-window-complete: no, 
--> FOAM Warning : 
    From void adapterInfo(std::string, std::string)
    in file Utilities.C at line 50
    Error (deferred - will exit later) in the preCICE adapter: 
Attempt to cast type fixedGradient to type fixedValue

Time = 0.0001

DICPCG:  Solving for T, Initial residual = 0.595024, Final residual = 8.40796e-07, No Iterations 37
DICPCG:  Solving for T, Initial residual = 0.537021, Final residual = 7.1532e-07, No Iterations 36
DICPCG:  Solving for T, Initial residual = 0.521095, Final residual = 7.09068e-07, No Iterations 36
ExecutionTime = 0.35 s  ClockTime = 51 s

[0] 
[0] 
[0] --> FOAM FATAL ERROR: 
[0] [1] 
[1] 
[1] --> FOAM FATAL ERROR: 
[1] Error in the preCICE adapter: 
There was a problem while configuring the adapter. See the log for details.
[1] 
[1] 
[1]     From void adapterInfo(std::string, std::string)
[1]     in file Utilities.C at line 32Error in the preCICE adapter: 
There was a problem while configuring the adapter. See the log for details.
[0] 
[0] 
[0]     From void adapterInfo(std::string, std::string)
[0]     in file Utilities.C at line 32.
[0] 
FOAM parallel run exiting
[0] 
.
[1] 
FOAM parallel run exiting
[1] 
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
[xie-Z790-D:837247] 1 more process has sent help message help-mpi-api.txt / mpi-abort

@mr.junfu444 I edited your topic to make it more easily readable:

Did you make any progress on this issue in the meantime?

In general, the configuration is described in the OpenFOAM adapter documentation:

For reading temperature, you define a fixedValue. For reading heat flux, you define a fixedGradient.

In your case, the cladding participant has two interfaces: one to the fuel, and one to the coolant. For this reason, you need to define two coupling meshes.

See how we define something very similar in this tutorial: