preCICE VM: No outputs generated when running Flow over heated plate example

Hi,
I’m trying to build a docker container from precice-vm.
I’ve managed to build the container from a nvidia opengl runtime container + UB 22.04.
Now I’m trying to run some cases from the tutorial.

I run into some problems with Flow over heated plate example.
The simulation with openfoam/fenics seems to run but I got no outputs:

  • .foam is empty
  • there is no preCICE-output in solid-fenics

How to make sure the outputs are properly generated?
Best
C.

PS: are there plans to update fenics to fenicsx? same question for code-aster 15.2?

Hi @Trophime

How do you ensure that the OpenFOAM-FEniCS simulation runs? Does the terminal log show that? The folder preCICE-output will only be created if the export tag is set in the preCICE configuration.

We already have a prototype FEniCSx adapter: GitHub - precice/fenicsx-adapter: Experimental preCICE-adapter for the open source computing platform FEniCSx. It is still limited in functionality, and it would highly depend on your application whether you can use it directly or not. A flow over heated plate type problem should be possible.

We do not have a plan for code-aster 15.2 as we lack solver-side expertise, but we would be very happy to support you, if you would like to update the current code-aster adapter.

1 Like

Hi,
Here are extracts from logs.
On fluid-openfoam side:

...
---[precice]  iteration: 2 of 30, time-window: 100, time: 0.99 of 1, time-window-size: 0.01, max-timestep-length: 0.01, ongoing: yes, time-window-complete: no, read-iteration-checkpoint 
Courant Number mean: 0.0854414 max: 0.452866
Time = 1

PIMPLE: iteration 1
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCGStab:  Solving for Ux, Initial residual = 0.00148141, Final residual = 1.37234e-07, No Iterations 1
DILUPBiCGStab:  Solving for Uy, Initial residual = 0.00560374, Final residual = 2.78597e-07, No Iterations 1
DILUPBiCGStab:  Solving for h, Initial residual = 0.00136981, Final residual = 6.1454e-07, No Iterations 8
DICPCG:  Solving for p_rgh, Initial residual = 0.00428972, Final residual = 3.74668e-05, No Iterations 152
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 6.70578e-10, global = -1.47311e-10, cumulative = -8.83022e-06
DICPCG:  Solving for p_rgh, Initial residual = 0.00123628, Final residual = 8.4435e-09, No Iterations 192
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 1.97563e-10, global = 3.0215e-13, cumulative = -8.83022e-06
ExecutionTime = 25.4 s  ClockTime = 74 s

---[precice]  Time window completed
---[precice]  iteration: 1 of 30, time-window: 101, time: 1 of 1, time-window-size: 0.01, max-timestep-length: 0.01, ongoing: no, time-window-complete: yes, 
---[preciceAdapter] The coupling timestep completed. Writing the updated results.
---[preciceAdapter] The coupling completed.
---[precice]  Synchronize participants and close communication channels
---[preciceAdapter] The simulation was ended by preCICE. Calling the end() methods of any functionObject explicitly.
---[preciceAdapter] Great that you are using the OpenFOAM-preCICE adapter! Next to the preCICE library and any other components, please also cite this adapter. Find how on https://precice.org/adapter-openfoam-overview.html.
End

Looking for any time directories without results (e.g. stray functionObjectProperties files, see openfoam-adapter issue #26 on GitHub)...
removed '0.19/uniform/functionObjects/functionObjectProperties'
removed directory '0.19/uniform/functionObjects'
removed directory '0.19/uniform'
removed directory '0.19'
removed '0.39/uniform/functionObjects/functionObjectProperties'
removed directory '0.39/uniform/functionObjects'
removed directory '0.39/uniform'
removed directory '0.39'
removed '0.59/uniform/functionObjects/functionObjectProperties'
removed directory '0.59/uniform/functionObjects'
removed directory '0.59/uniform'
removed directory '0.59'
removed '0.79/uniform/functionObjects/functionObjectProperties'
removed directory '0.79/uniform/functionObjects'
removed directory '0.79/uniform'
removed directory '0.79'
removed '0.99/uniform/functionObjects/functionObjectProperties'
removed directory '0.99/uniform/functionObjects'
removed directory '0.99/uniform'
removed directory '0.99'

on fenics side:

ckpoint 
Solving linear variational problem.
Solving linear variational problem.
---[precice]  relative convergence measure: relative two-norm diff of data "Temperature" = 3.57e-05, limit = 1.00e-05, normalization = 3.85e+03, conv = false
---[precice]  iteration: 2 of 30, time-window: 100, time: 0.99 of 1, time-window-size: 0.01, max-timestep-length: 0.01, ongoing: yes, time-window-complete: no, read-iteration-checkpoint 
Solving linear variational problem.
Solving linear variational problem.
---[precice]  relative convergence measure: relative two-norm diff of data "Temperature" = 1.05e-06, limit = 1.00e-05, normalization = 3.85e+03, conv = true
---[precice]  All converged
---[precice]  Time window completed
---[precice]  iteration: 1 of 30, time-window: 101, time: 1 of 1, time-window-size: 0.01, max-timestep-length: 0.01, ongoing: no, time-window-complete: yes, 
output vtk for time = 1.0000000000000007
---[precice]  Synchronize participants and close communication channels

I’m really a newbie as for precice but my understanding is that the solver(s) run fine.

PS: my goal is to provide a docker for testing precice. In a next step I would like to see if I can couple my code based on feelpp library in precice. I can share my dockerfile with the project once I have managed to make it run properly.

Best

Hi there,
It indeed looks like both the participants run through. I am not sure why the OpenFOAM side is not producing output, perhaps it is because the output is not configured in the OpenFOAM files. @Makis could probably say more here.

Can you upload your preCICE XML configuration file? preCICE output will only be written if the export functionality is configured, so we should check that.

The xmf precice conf is coming directly from precie-vm install, namely

Okay. If you want preCICE to export files which you can view in ParaView or any other visualization tool, you have to add Export configuration | preCICE - The Coupling Library to the participant that you want the output from. Currently there is no export because we do want to output data by default in the virtual machine, but you can add it yourself.

Hi @Trophime,

This is supposed to be like this. You will often see empty files such as .foam or .OpenFOAM in OpenFOAM projects. These are meant only as location identifiers to ParaView, which then uses the path of this file to discover the OpenFOAM results files.

Results files should be in the directories 0/ 0.2/ 0.4/ 0.6/ 0.8/ 1/. These are in the OpenFOAM format, but you can also convert them to VTK running foamToVTK (without any options) from the fluid-openfoam directory.

Can you see the OpenFOAM results in ParaView?

For everything else, I agree with @IshaanDesai.

1 Like