按照https://github.com/precice/openfoam-adapter/wiki/Tutorial-for-CHT:-Flow-over-a-heated-plate的安装步骤,完成OpenFOAM+preCICE软件的安装
安装大致流程:
Tutorial for a coupled simulation with OpenFOAM
This tutorial describes how to run a conjugate heat transfer with OpenFOAM. The files for this tutorial can be found in the tutorials directory and are prepared for OpenFOAM 5.
You may also find more tutorials on the preCICE wiki.
Case setup
This scenario consists of one fluid and one solid participant. A fluid enters in a channel with temperature 300K, where it comes in contact with a solid plate, which is heated from below at a constant temperature of 310K.

This test case is two-dimensional, but because OpenFOAM is written for three-dimensional simulations, we run a quasi-2D simulation with three dimensional meshes with only one cell in y-direction.
A serial-implicit coupling is used, where the fluid participant reads heat fluxes and the solid participant reads temperatures. Both participants can be executed either in serial or in parallel.
Used solvers
Fluid flow: OpenFOAM, solver buoyantPimpleFoam. This is an open-source solver for transient, buoyant, turbulent flow of compressible fluids for ventilation and heat transfer.
Heat transfer on the solid: OpenFOAM, solver laplacianFoam. This is an open-source solver that can solve the thermal diffusion in a solid.
The tutorial is prepared for OpenFOAM 5.0 from openfoam.org. OpenFOAM v1706 from openfoam.com is also compatible.
OpenFOAM website (variant from The OpenFOAM Foundation)
OpenFOAM website (variant from the ESI Group)
Step 1: Install required software
For simulating the described case, the following software is necessary:
OpenFOAM: the package that provides the fluid and the solid solvers. If you are using Ubuntu, precompiled packages are available.
preCICE: the coupling library.
After installing both OpenFOAM and preCICE, you need to build the OpenFOAM adapter.
Step 2: Setup solvers
Both cases are already configured. If you want to learn more about the configuration, you may read the following pages:
OpenFOAM setup (fluid)
OpenFOAM setup (solid)
Both participants require the precice-config.xml file. Since we provide both a serial and a parallel version of the tutorial, this is a link that points either to precice-config_serial.xml or to precice-config_parallel.xml, depending on which script is used to run the case. For more information about this file, see the preCICE wiki.
Step 3: Simulate
Run the coupled simulation.
Step 4: Visualize
After the first results are written (a new time directory will be created), you may visualize the results.