Issues on preCICE for CHT problem: icoReactingMultiphaseInterFoam and laplacianFoam

hallo Thomas,

I’m still trying to install your OF2012 container. When I try to
build, I have the below warning messages. Are these warning messages
critical ?

After the build, ignoring the warnings, I try to run the Docker OF,
but it looks like the OF environment variables are not known. so
running ./Allrun (your laplacien case) crashes due to unknown commands
or repository.

docker images command give:

REPOSITORY TAG IMAGE ID
CREATED SIZE
tefe/openfoam.com latest 69280c890cd5 14
minutes ago 3GB
fedora 33 cdbb8f8ea474
2 weeks ago 172MB
quay.io/fenicsproject/stable current f99661bca197 2 years ago 1.96GB

Executing an OpenFOAM case from the current directory:

docker run -it --rm -v $PWD:/data tefe/openfoam.com:latest ./Allrun
gives an error

root@palabos-HP:/home/palabos/OpenFOAM/2022-OF_JetImpingement/Water-Cooker/laplacianFoam#
docker run -it --rm -v $PWD:/data tefe/openfoam.com:latest ./Allrun
docker: Error response from daemon: OCI runtime create failed:
container_linux.go:349: starting container process caused “exec:
“./Allrun”: stat ./Allrun: no such file or directory”: unknown.

Get a bash with all containg OpenFOAM commands:

docker run -it --rm -v $PWD:/data tefe/openfoam.com:latest bash

root@palabos-HP:/home/palabos/OpenFOAM/2022-OF_JetImpingement/Water-Cooker/laplacianFoam#
pwd
/home/palabos/OpenFOAM/2022-OF_JetImpingement/Water-Cooker/laplacianFoam
root@palabos-HP:/home/palabos/OpenFOAM/2022-OF_JetImpingement/Water-Cooker/laplacianFoam#
docker run -it --rm -v $PWD:/data tefe/openfoam.com:latest bash
[root@bcd40c45a46c /]# ls
bin boot data dev etc home lib lib64 lost+found media mnt
opt proc root run sbin srv sys tmp usr var

How to start the image and keep access to the full local repository ?

sorry for all the questions but I’m just starting and learning.

thanks

++ get_latest_release precice/precice
++ curl --silent https://api.github.com/repos/precice/precice/releases/latest
++ grep ‘“tag_name”:’
++ sed -E ‘s/."([^"]+)"./\1/’

  • export preCICE_VERSION_ENTIRE=v2.2.1
  • preCICE_VERSION_ENTIRE=v2.2.1
    ++ echo v2.2.1
    ++ sed ‘s|^[^0-9]*||’
  • export preCICE_VERSION=2.2.1
  • preCICE_VERSION=2.2.1
  • export preCICE_BUILD_DIR=/opt/preCICE
  • preCICE_BUILD_DIR=/opt/preCICE
  • export preCICE_GIT_URL=https://github.com/precice/precice/archive/v2.2.1.tar.gz
  • preCICE_GIT_URL=https://github.com/precice/precice/archive/v2.2.1.tar.gz
  • export preCICE_ROOT=/opt/preCICE/precice-2.2.1
  • preCICE_ROOT=/opt/preCICE/precice-2.2.1
  • echo ‘export preCICE_VERSION_ENTIRE=v2.2.1’
  • echo ‘export preCICE_VERSION=2.2.1’
  • echo ‘export preCICE_BUILD_DIR=/opt/preCICE’
  • echo ‘export preCICE_GIT_URL=https://github.com/precice/precice/archive/v2.2.1.tar.gz’
  • echo ‘export preCICE_ROOT=/opt/preCICE/precice-2.2.1’
  • mkdir -p /opt/preCICE
  • cd /opt/preCICE
  • wget -q https://github.com/precice/precice/archive/v2.2.1.tar.gz
  • tar -xzvf v2.2.1.tar.gz
  • rm -f v2.2.1.tar.gz
  • mkdir -p /opt/preCICE/precice-2.2.1/build
  • cd /opt/preCICE/precice-2.2.1/build
  • cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
    -DPRECICE_MPICommunication=ON
    -DMPI_CXX_COMPILER=/usr/lib64/openmpi/bin/mpicxx
    -DMPI_C_COMPILER=/usr/lib64/openmpi/bin/mpicc
    -DMPI_Fortran_COMPILER=/usr/lib64/openmpi/bin/mpifort
    -DPRECICE_PETScMapping=off …

Debian package generator disabled: Install prefix is not “/usr”

CMake Warning:
Manually-specified variables were not used by the project:

MPI_Fortran_COMPILER

++ nproc

  • make -j8
    In file included from /usr/include/boost/bind.hpp:30,
    from
    /opt/preCICE/precice-2.2.1/src/com/SocketCommunication.cpp:4:
    /usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice
    of declaring the Bind placeholders (_1, _2, …) in the global
    namespace is deprecated. Please use <boost/bind/bind.hpp> + using
    namespace boost::placeholders, or define
    BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
    36 | BOOST_PRAGMA_MESSAGE(
    > ^~~~~~~~~~~~~~~~~~~~
    /opt/preCICE/precice-2.2.1/src/cplscheme/config/CouplingSchemeConfiguration.cpp:
    In member function ‘precice::cplscheme::constants::TimesteppingMethod
    precice::cplscheme::CouplingSchemeConfiguration::getTimesteppingMethod(const
    string&) const’:
    /opt/preCICE/precice-2.2.1/src/cplscheme/config/CouplingSchemeConfiguration.cpp:981:1:
    warning: control reaches end of non-void function [-Wreturn-type]
    981 | }
    > ^
    /opt/preCICE/precice-2.2.1/src/mesh/config/DataConfiguration.cpp: In
    member function ‘int
    precice::mesh::DataConfiguration::getDataDimensions(const string&)
    const’:
    /opt/preCICE/precice-2.2.1/src/mesh/config/DataConfiguration.cpp:96:1:
    warning: control reaches end of non-void function [-Wreturn-type]
    96 | }
    > ^
    /opt/preCICE/precice-2.2.1/src/mapping/config/MappingConfiguration.cpp:
    In member function ‘precice::mapping::MappingConfiguration::Timing
    precice::mapping::MappingConfiguration::getTiming(const string&)
    const’:
    /opt/preCICE/precice-2.2.1/src/mapping/config/MappingConfiguration.cpp:432:1:
    warning: control reaches end of non-void function [-Wreturn-type]
    432 | }
    > ^

… end of the prompt message

‘[’ 4 -le 4 ‘]’

  • export CGAL_ARCHIVE_FILE_NAME=CGAL-4.12.2.tar.gz
  • CGAL_ARCHIVE_FILE_NAME=CGAL-4.12.2.tar.gz
  • export CGAL_DOWNLOAD_URL=https://github.com/CGAL/cgal/archive/releases/CGAL-4.12.2.tar.gz
  • CGAL_DOWNLOAD_URL=https://github.com/CGAL/cgal/archive/releases/CGAL-4.12.2.tar.gz
  • echo ‘export BOOST_VERSION_ENTIRE=1.66.0’
  • echo ‘export CGAL_VERSION_ENTIRE=4.12.2’
  • echo ‘export CGAL_VERSION_MAJOR=4’
  • echo ‘export BOOST_ARCHIVE_FILE_NAME=boost_1_66_0.tar.gz’
  • echo ‘export CGAL_ARCHIVE_FILE_NAME=CGAL-4.12.2.tar.gz’
  • echo ‘export BOOST_DOWNLOAD_URL=https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz’
  • echo ‘export CGAL_DOWNLOAD_URL=https://github.com/CGAL/cgal/archive/releases/CGAL-4.12.2.tar.gz’
  • cd /opt/OpenFOAM/ThirdParty-v2106
  • wget -q https://dl.bintray.com/boostorg/release/1.66.0/source/boost_1_66_0.tar.gz
    The command ‘/bin/bash -c /opt/scripts/install/openfoam >
    /opt/log.openfoam’ returned a non-zero code: 8

Yes, the last line of the warning is critical. The script does not catch all erros and break the build.

A time ago the boost download link was changed. from dl.bintray.com… to boostorg.jfrog.io. I fixed it also time ago but do not pushed the fix to the public repository. So, it is done now.

Please execute “git pull” to load the fix and select the v2012 version with “git checkout v2012”.
After hooks/build you should get an clean image.

Hallo Thomas,

with the command : git pull https://github.com/TEFEdotCC/Containered-OpenFOAM.com i get an error. Is that the right branch for the git pull ?

What error message do you get?

finally I cloned the Githu directory and know the command work,

I still had warning during the /hooks/build
but get successful message at the end.
Step 33/33 : ENTRYPOINT ["/bin/bash", “-ci”]
—> Running in 0b5cbdfb2ca4
Removing intermediate container 0b5cbdfb2ca4
—> 1ea3cd6c72b2
Successfully built 1ea3cd6c72b2
Successfully tagged tefe/openfoam.com:v2012

running the: docker run -it --rm -v $PWD:/data tefe/openfoam.com:v2012 bash don’t have any error.

Except that the Laplacian (case) water-cooker tutorial doesn’t behave well. the case is running but it looks like the solid and fluid are not coupled. the solid behave as the interface is a fixed temperature and the same behavior is observed for the fluid.

I didn’t make any change on the tutorial case and did’t get an error during the build. is that because of the warning ?

checking the log files, I found the bellow error:

_**From void adapterInfo(std::string, std::string)**_
_**in file Core/Utilities.C at line 17**_
_**[36mWarning in the preCICE adapter: [0m**_
_**The solver's timestep cannot be larger than the coupling timestep. Adjusting from 0.010000 to 0.001000**_

_**---[preciceAdapter] Setting the solver's endTime to infinity to prevent early exits. Only preCICE will control the simulation's endTime. Any functionObject's end() method will be triggered by the adapter. You may disable this behavior in the adapter's configuration.**_
_**Time = 0.001**_

_**Using dynamicCode for fvOption::sourceTime at line 20 in "/data/laplacianFoam/heater1/constant/fvOptions.heatSource"**_
<i>**Could not load "/data/laplacianFoam/heater1/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libsourceTime_a85d0b6af0e653272d0413495aacfe0b906e4711.so"**</i>
<i>**/data/laplacianFoam/heater1/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libsourceTime_a85d0b6af0e653272d0413495aacfe0b906e4711.so: cannot open shared object file: No such file or directory**</i>
<i>**Creating new library in "dynamicCode/sourceTime/platforms/linux64GccDPInt32Opt/lib/libsourceTime_a85d0b6af0e653272d0413495aacfe0b906e4711.so"**</i>
_**Invoking wmake libso /data/laplacianFoam/heater1/dynamicCode/sourceTime**_
_**wmake libso /data/laplacianFoam/heater1/dynamicCode/sourceTime**_
_**ln: ./lnInclude**_
_**dep: codedFvOptionTemplate.C**_
_**Ctoo: codedFvOptionTemplate.C**_
<i>**ld: /data/laplacianFoam/heater1/dynamicCode/sourceTime/../platforms/linux64GccDPInt32Opt/lib/libsourceTime_a85d0b6af0e653272d0413495aacfe0b906e4711.so**</i>
_**Selecting finite volume options type sourceTime**_
_**Source: sourceTime**_

---[precice] [0m Compute write mapping from mesh "Heater1-Mesh" to mesh "Fluid-Mesh".
---[precice] [0m Mapping distance min:0 max:1.38778e-17 avg: 1.85292e-18 var: 1.10414e-35 cnt: 179
---[precice] [0m initializeData is skipped since no data has to be initialized.
---[preciceAdapter] preCICE was configured and initialized
---[preciceAdapter] [DEBUG] Reading coupling data...
---[preciceAdapter] [DEBUG] Creating a list of checkpointed fields...
---[preciceAdapter] [DEBUG] Collecting objects of type volScalarField...
---[preciceAdapter] [DEBUG] Will be checkpointing DT
---[preciceAdapter] [DEBUG] Will be checkpointing kappa
---[preciceAdapter] [DEBUG] Will be checkpointing T
---[preciceAdapter] [DEBUG] Collecting objects of type volVectorField...
---[preciceAdapter] [DEBUG] Collecting objects of type surfaceScalarField...
---[preciceAdapter] [DEBUG] Collecting objects of type surfaceVectorField...
---[preciceAdapter] [DEBUG] Collecting objects of type pointScalarField...
---[preciceAdapter] [DEBUG] Collecting objects of type pointVectorField...
---[preciceAdapter] [DEBUG] Collecting objects of type volTensorField...
---[preciceAdapter] [DEBUG] Collecting objects of type surfaceTensorField...
---[preciceAdapter] [DEBUG] Collecting objects of type pointTensorField...
---[preciceAdapter] [DEBUG] Collecting objects of type volSymmTensorField...
---[preciceAdapter] [DEBUG] Writing a checkpoint...
---[preciceAdapter] [DEBUG] Stored time value t = 0.000000
---[preciceAdapter] [DEBUG] Checkpoint for time t = 0.000000 was stored.
---[preciceAdapter] [DEBUG] Adjusting the solver's timestep...
--> FOAM Warning :
_**From void adapterInfo(std::string, std::string)**_
_**in file Core/Utilities.C at line 17**_
_**[36mWarning in the preCICE adapter: [0m**_
_**The solver's timestep cannot be larger than the coupling timestep. Adjusting from 0.010000 to 0.001000**_

_**---[preciceAdapter] Setting the solver's endTime to infinity to prevent early exits. Only preCICE will control the simulation's endTime. Any functionObject's end() method will be triggered by the adapter. You may disable this behavior in the adapter's configuration.**_
_**Time = 0.001**_

_**Using dynamicCode for fvOption::sourceTime at line 20 in "/data/laplacianFoam/heater1/constant/fvOptions.heatSource"**_
<i>**Could not load "/data/laplacianFoam/heater1/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libsourceTime_a85d0b6af0e653272d0413495aacfe0b906e4711.so"**</i>
<i>**/data/laplacianFoam/heater1/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libsourceTime_a85d0b6af0e653272d0413495aacfe0b906e4711.so: cannot open shared object file: No such file or directory**</i>
<i>**Creating new library in "dynamicCode/sourceTime/platforms/linux64GccDPInt32Opt/lib/libsourceTime_a85d0b6af0e653272d0413495aacfe0b906e4711.so"**</i>
_**Invoking wmake libso /data/laplacianFoam/heater1/dynamicCode/sourceTime**_
_**wmake libso /data/laplacianFoam/heater1/dynamicCode/sourceTime**_
_**ln: ./lnInclude**_
_**dep: codedFvOptionTemplate.C**_
_**Ctoo: codedFvOptionTemplate.C**_
<i>**ld: /data/laplacianFoam/heater1/dynamicCode/sourceTime/../platforms/linux64GccDPInt32Opt/lib/libsourceTime_a85d0b6af0e653272d0413495aacfe0b906e4711.so**</i>
_**Selecting finite volume options type sourceTime**_
_**Source: sourceTime**_
- selecting all cells
- selected 2455 cell(s) with volume 5.67333652e-08
DICPCG: Solving for T, Initial residual = 1, Final residual = 0.0267724976, No Iterations 1
DICPCG: Solving for T, Initial residual = 0.194104646, Final residual = 0.00869528585, No Iterations 1
DICPCG: Solving for T, Initial residual = 0.0115569859, Final residual = 0.000647349821, No Iterations 1
ExecutionTime = 0.43 s ClockTime = 7 s

---[preciceAdapter] [DEBUG] Writing coupling data...
---[preciceAdapter] [DEBUG] Advancing preCICE...
---[precice] [0m Compute read mapping from mesh "Fluid-Mesh" to mesh "Heater1-Mesh".
---[precice] [0m Mapping distance min:0 max:1.38778e-17 avg: 1.85292e-18 var: 1.10414e-35 cnt: 179
---[precice] [0m iteration: 2 of 5, time-window: 1, time: 0 of 300, time-window-size: 0.001, max-timestep-length: 0.001, ongoing: yes, time-window-complete: no, read-iteration-checkpoint
---[preciceAdapter] [DEBUG] Reading a checkpoint...
---[preciceAdapter] [DEBUG] Reloaded time value t = 0.000000
---[preciceAdapter] [DEBUG] Checkpoint was read. Time = 0.000000
---[preciceAdapter] [DEBUG] Reading coupling data...
---[preciceAdapter] [DEBUG] Adjusting the solver's timestep...
--> FOAM Warning :
From void adapterInfo(std::string, std::string)
in file Core/Utilities.C at line 17
[36mWarning in the preCICE adapter: [0m
The solver's timestep cannot be larger than the coupling timestep. Adjusting from 0.010000 to 0.001000

Time = 0.001

Hello Thomas,

Know the container is installed without issues. but still the coupling not working, the exchange of data between the solid and fluid seems to be not working. Both tutorial cases (water-heater and flow over plate) run but not solid and fluid is not coupled. is like the initial conditions are kept over all the simulation.

is there anyway to see if the data exchange between solid and fluid is ok ?
thanks

on the water-heater case (from openfoam-adapter-develop_cht_rework): I got the bellow message in precice-Heater1-iterations.log file:


Using dynamicCode for fvOption::sourceTime at line 20 in "/home/palabos/OpenFOAM/openfoam-adapter-develop_cht_rework/tutorials/CHT/water-heater/icoReactingMultiphaseInterFoam-laplacianFoam/heater1/constant/fvOptions.heatSource"
Could not load "/home/palabos/OpenFOAM/openfoam-adapter-develop_cht_rework/tutorials/CHT/water-heater/icoReactingMultiphaseInterFoam-laplacianFoam/heater1/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libsourceTime_6c60090c0f8ccfb6a7ad6ddae0110a62cffa1ff4.so"
/home/palabos/OpenFOAM/openfoam-adapter-develop_cht_rework/tutorials/CHT/water-heater/icoReactingMultiphaseInterFoam-laplacianFoam/heater1/dynamicCode/platforms/linux64GccDPInt32Opt/lib/libsourceTime_6c60090c0f8ccfb6a7ad6ddae0110a62cffa1ff4.so: cannot open shared object file: No such file or directory
Creating new library in "dynamicCode/sourceTime/platforms/linux64GccDPInt32Opt/lib/libsourceTime_6c60090c0f8ccfb6a7ad6ddae0110a62cffa1ff4.so"
Invoking wmake libso /home/palabos/OpenFOAM/openfoam-adapter-develop_cht_rework/tutorials/CHT/water-heater/icoReactingMultiphaseInterFoam-laplacianFoam/heater1/dynamicCode/sourceTime
wmake libso /home/palabos/OpenFOAM/openfoam-adapter-develop_cht_rework/tutorials/CHT/water-heater/icoReactingMultiphaseInterFoam-laplacianFoam/heater1/dynamicCode/sourceTime
    ln: ./lnInclude
    dep: codedFvOptionTemplate.C
    Ctoo: codedFvOptionTemplate.C
    ld: /home/palabos/OpenFOAM/openfoam-adapter-develop_cht_rework/tutorials/CHT/water-heater/icoReactingMultiphaseInterFoam-laplacianFoam/heater1/dynamicCode/sourceTime/../platforms/linux64GccDPInt32Opt/lib/libsourceTime_6c60090c0f8ccfb6a7ad6ddae0110a62cffa1ff4.so

Just to add that the file .so is available in the directory. So just don’t why during execution the system is not able to find it.

Hello Makis,

I’m very busy these days. I will check your errors in the next month and try to reproduce your errors. Novmeber++ seems a good time for me actually :frowning:

Best reards,
Thomas

@TEFEdotCC just to avoid any misunderstandings, I am a different person than @Mak57 :sweat_smile: Unfortunately, I cannot really help Mak57 with your code, though. :confused:

Hi Makis,

I didn’t catch that. Thank you for pointing that out.

waiting for inputs from Thomas on his tutorials cases, on the case that I’m building with the TEFE docker and using IcoReactingMultiphaseInterFoam and LaplacianFoam models and Precice, I don’t had any error messages, but still not have real coupling. The case behaved as I had fixed temperature in the fluid and fixed flux in the solid.

Could you please review the precice xml configuration file below ? Is there any way to export the computed heat flux at the interface to debug and check the computed values ?

thanks

Hi @Mak57,

I am afraid that attaching the preCICE config file did not work. But regarding your question

yes, there is a way: you can export VTK files containing the values at the interface that preCICE knows. See Exports configuration | preCICE - The Coupling Library

Hi Makis,

the XML file was copied at the end of the message. it is attached here-by.

Thanks

precice-config.xml (2.41 KB)

Hi everybody,

This line has no function, you can remove it:

<use-mesh name="Solid-Mesh" from="Solid"/>

(Such problems are easy to spot with the config visualizer.)

Moreover, coupling-scheme:multi is only meant to be used for more than two participants. For two participants, better use coupling-scheme:parallel-implicit.
Then, you need …

<participants first="Fluid" second="Solid" />

instead of

<participant name="Fluid" control="yes" />
<participant name="Solid" />
1 Like

Hi Thomas,

I hope that you are doing well.
I did’t successed to tackle the issues reported in this blog. I still have the two model behave as they are not coupled, no information exchange.
did you had a chance to take a look ?
I remind, that even the tutorials that you shared with the adaptor “both tutorial cases (water-heater and flow over plate) run but not solid and fluid is not coupled”
thanks for your help

Today I checked the simple example “flow-over-plate” with openfoam.com:v2012 and preCICE 2.2.1.
The result looks like expected. I had attached the reference image from offical repository (overview.png) and my results from the test today.

I used the example from

To ensure you had the same testing enviroment. The docker container which I used.



1 Like

I forgot these lines.

Your precice-config.xml let me expect that your case is simular to the heat over plate example. So, I checked wether my custom openfoam adapter works well an that case.