From a126d01eb7d7f61b49dea8cd3841346c69e629bb Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 4 Feb 2025 22:12:34 +0100 Subject: [PATCH 01/12] Document differences for older OpenCFD versions --- docs/openfoam-support.md | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/docs/openfoam-support.md b/docs/openfoam-support.md index a09eed5c..c274f664 100644 --- a/docs/openfoam-support.md +++ b/docs/openfoam-support.md @@ -19,6 +19,10 @@ sudo apt-get install openfoam2412-dev As these steps change your `.profile`, you need to log out and in again to make OpenFOAM fully discoverable. +## Supported OpenFOAM solvers + +We support mainstream OpenFOAM solvers such as pimpleFoam and solids4Foam for FSI, buoyantPimpleFoam, buoyantSimpleFoam, and laplacianFoam for CHT, or pimpleFoam and sonicLiquidFoam for FF. Our community has, additionally, tried the adapter with multiple different solvers that support function objects. + ## Supported OpenFOAM versions OpenFOAM is a project with long history and many forks, of which we try to support as many as possible. Since several HPC systems only provide older versions, we try to also support a wide range of versions. @@ -50,9 +54,40 @@ We provide version-specific [release archives](https://github.com/precice/openfo Known not supported versions: OpenFOAM v1606+ or older, OpenFOAM 3 or older, foam-extend (any version). -## Supported OpenFOAM solvers +## Differences between OpenFOAM versions -We support mainstream OpenFOAM solvers such as pimpleFoam and solids4Foam for FSI, buoyantPimpleFoam, buoyantSimpleFoam, and laplacianFoam for CHT, or pimpleFoam and sonicLiquidFoam for FF. Our community has, additionally, tried the adapter with multiple different solvers that support function objects. +We take into account the following relevant differences between OpenFOAM versions, compared to the latest OpenCFD version. This list is important for maintainers of version-specific ports of the adapter. + +### OpenFOAM v1612-v1806 + +- **clockValue:** The `clockValue.H` header is not available (used in `preciceAdapterFunctionObject.H`). + - Disable the timers feature, controlled by the `ADAPTER_ENABLE_TIMINGS` preprocessor variable (set in `Allwmake`). +- **dictionary access:** In dictionaries (essentially: in the `preciceDict`), some methods are not available. These are mainly used in the configuration step in `Adapter.C`, but also in `ForceBase.C`. + - Replace `preciceDict.get("...")` with `static_cast(preciceDict.lookup("...")`. + - Replace `preciceDict.get("...")` with `static_cast(preciceDict.lookup("..."))`. + - Replace `preciceDict.get("...")` with `static_cast(preciceDict.lookup("..."))`. + - Replace `preciceDict.findDict("...")` with `preciceDict.subDictPtr("...")`. +- **Db access:** In the macro that deals with adding checkpointed fields, some methods are not available. + - Replace `mesh_.sortedNames()` with `mesh_.lookupClass().sortedToc()`. + - Replace `mesh_.thisDb().getObjectPtr(obj)` with `&(const_cast(mesh_.thisDb().lookupObject(obj)))`. +- **Pointers:** `std::unique_ptr` is not available. + - Replace `std::unique_ptr` with `Foam::autoPtr`. + - Replace calls to pointer `.reset()`, such as `ForceOwning_.reset(new volVectorField(`, with `ForceOwning_ = new volVectorField(`. Adjust the number of closing parentheses. + - Replace calls to pointer `.get();`, such as `ForceOwning_.get()`, with `ForceOwning_.ptr()`. + +### OpenFOAM 4 + +### OpenFOAM 5 + +### OpenFOAM 7 + +### OpenFOAM 8 + +### OpenFOAM 9 + +### OpenFOAM 10 + +### foam-extend ## Notes on OpenFOAM features From 63d022e631bd1688c89ce23df7ba514840ed9022 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 4 Feb 2025 22:35:48 +0100 Subject: [PATCH 02/12] Document differences in OpenFOAM 4-7 --- docs/openfoam-support.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/openfoam-support.md b/docs/openfoam-support.md index c274f664..a2338da3 100644 --- a/docs/openfoam-support.md +++ b/docs/openfoam-support.md @@ -75,12 +75,26 @@ We take into account the following relevant differences between OpenFOAM version - Replace calls to pointer `.reset()`, such as `ForceOwning_.reset(new volVectorField(`, with `ForceOwning_ = new volVectorField(`. Adjust the number of closing parentheses. - Replace calls to pointer `.get();`, such as `ForceOwning_.get()`, with `ForceOwning_.ptr()`. -### OpenFOAM 4 +### OpenFOAM 4 and 5 -### OpenFOAM 5 +Same as in OpenFOAM v1612-v1806. + +### OpenFOAM 6 + +Compared to OpenFOAM 5: + +- **adjustTimeStep:** In the function objects interface, `adjustTimeStep()` was renamed to `setTimeStep()`. + - Replace `adjustTimeStep()` with `setTimeStep()`, both for the function object and the adapter members. +- **setDeltaT:** The `Time` method `setDeltaT(..., false)` was replaced by `setDeltaTNoAdjust(...)`. + - Replace `setDeltaT(timestepSolver_, false)` with `setDeltaTNoAdjust(timestepSolver_)`. ### OpenFOAM 7 +Compared to OpenFOAM 6: + +- **fileName:** `fileName::DIRECTORY` was renamed to `fileType::directory`. + - Replace this in the `Adapter.C`. + ### OpenFOAM 8 ### OpenFOAM 9 From dcb3737e46b0d7c69d38554889bb421a31193893 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 11 Feb 2025 12:14:10 +0100 Subject: [PATCH 03/12] Add release dates for reference --- docs/openfoam-support.md | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/docs/openfoam-support.md b/docs/openfoam-support.md index a2338da3..75c07e45 100644 --- a/docs/openfoam-support.md +++ b/docs/openfoam-support.md @@ -77,11 +77,13 @@ We take into account the following relevant differences between OpenFOAM version ### OpenFOAM 4 and 5 +OpenFOAM 4 was released in June 2016 and OpenFOAM 5 in July 2017. + Same as in OpenFOAM v1612-v1806. ### OpenFOAM 6 -Compared to OpenFOAM 5: +OpenFOAM 6 was released in July 2018. Compared to OpenFOAM 5: - **adjustTimeStep:** In the function objects interface, `adjustTimeStep()` was renamed to `setTimeStep()`. - Replace `adjustTimeStep()` with `setTimeStep()`, both for the function object and the adapter members. @@ -90,17 +92,41 @@ Compared to OpenFOAM 5: ### OpenFOAM 7 -Compared to OpenFOAM 6: +OpenFOAM 7 was released in July 2019. Compared to OpenFOAM 6: - **fileName:** `fileName::DIRECTORY` was renamed to `fileType::directory`. - Replace this in the `Adapter.C`. ### OpenFOAM 8 +OpenFOAM 8 was released in July 2020. Compared to OpenFOAM 7: + +TBD + ### OpenFOAM 9 +OpenFOAM 9 was released in July 2021. Compared to OpenFOAM 8: + +TBD + ### OpenFOAM 10 +OpenFOAM 10 was released in July 2022. Compared to OpenFOAM 9: + +TBD + +### OpenFOAM 11 + +OpenFOAM 11 was released in July 2023. Compared to OpenFOAM 10: + +TBD + +### OpenFOAM 12 + +OpenFOAM 12 was released in July 2024. Compared to OpenFOAM 11: + +TBD + ### foam-extend ## Notes on OpenFOAM features From e7284c1dc1c0eae977db3d272d93a2eb2276d353 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 11 Feb 2025 12:25:10 +0100 Subject: [PATCH 04/12] Add links to GitHub mirrors and Doxygen pages --- docs/openfoam-support.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/openfoam-support.md b/docs/openfoam-support.md index 75c07e45..086e90a5 100644 --- a/docs/openfoam-support.md +++ b/docs/openfoam-support.md @@ -77,13 +77,15 @@ We take into account the following relevant differences between OpenFOAM version ### OpenFOAM 4 and 5 -OpenFOAM 4 was released in June 2016 and OpenFOAM 5 in July 2017. +OpenFOAM 4 was [released](https://openfoam.org/release/4/) in June 2016 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-4.x), [Doxygen](https://cpp.openfoam.org/v4)). + +OpenFOAM 5 was [released](https://openfoam.org/release/5/) in July 2017 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-5.x), [Doxygen](https://cpp.openfoam.org/v5)). Same as in OpenFOAM v1612-v1806. ### OpenFOAM 6 -OpenFOAM 6 was released in July 2018. Compared to OpenFOAM 5: +OpenFOAM 6 was [released](https://openfoam.org/release/6/) in July 2018 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-6), [Doxygen](https://cpp.openfoam.org/v6)). Compared to OpenFOAM 5: - **adjustTimeStep:** In the function objects interface, `adjustTimeStep()` was renamed to `setTimeStep()`. - Replace `adjustTimeStep()` with `setTimeStep()`, both for the function object and the adapter members. @@ -92,38 +94,38 @@ OpenFOAM 6 was released in July 2018. Compared to OpenFOAM 5: ### OpenFOAM 7 -OpenFOAM 7 was released in July 2019. Compared to OpenFOAM 6: +OpenFOAM 7 was [released](https://openfoam.org/release/7/) in July 2019 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-7), [Doxygen](https://cpp.openfoam.org/v7)). Compared to OpenFOAM 6: - **fileName:** `fileName::DIRECTORY` was renamed to `fileType::directory`. - Replace this in the `Adapter.C`. ### OpenFOAM 8 -OpenFOAM 8 was released in July 2020. Compared to OpenFOAM 7: +OpenFOAM 8 was rele[released](https://openfoam.org/release/8/)ased in July 2020 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-8), [Doxygen](https://cpp.openfoam.org/v8)). Compared to OpenFOAM 7: TBD ### OpenFOAM 9 -OpenFOAM 9 was released in July 2021. Compared to OpenFOAM 8: +OpenFOAM 9 was [released](https://openfoam.org/release/9/) in July 2021 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-9), [Doxygen](https://cpp.openfoam.org/v9)). Compared to OpenFOAM 8: TBD ### OpenFOAM 10 -OpenFOAM 10 was released in July 2022. Compared to OpenFOAM 9: +OpenFOAM 10 was [released](https://openfoam.org/release/10/) in July 2022 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-10), [Doxygen](https://cpp.openfoam.org/v10)). Compared to OpenFOAM 9: TBD ### OpenFOAM 11 -OpenFOAM 11 was released in July 2023. Compared to OpenFOAM 10: +OpenFOAM 11 was [released](https://openfoam.org/release/11/) in July 2023 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-11), [Doxygen](https://cpp.openfoam.org/v11)). Compared to OpenFOAM 10: TBD ### OpenFOAM 12 -OpenFOAM 12 was released in July 2024. Compared to OpenFOAM 11: +OpenFOAM 12 was [released](https://openfoam.org/release/12/) in July 2024 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-12), [Doxygen](https://cpp.openfoam.org/v12)). Compared to OpenFOAM 11: TBD From a2c120cfa89fa6e9309b0e69b2ab4af5b0d7380a Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 11 Feb 2025 16:43:41 +0100 Subject: [PATCH 05/12] Document differences in OpenFOAM 8 --- docs/openfoam-support.md | 42 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/docs/openfoam-support.md b/docs/openfoam-support.md index 086e90a5..e1da9d74 100644 --- a/docs/openfoam-support.md +++ b/docs/openfoam-support.md @@ -101,9 +101,45 @@ OpenFOAM 7 was [released](https://openfoam.org/release/7/) in July 2019 ([GitHub ### OpenFOAM 8 -OpenFOAM 8 was rele[released](https://openfoam.org/release/8/)ased in July 2020 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-8), [Doxygen](https://cpp.openfoam.org/v8)). Compared to OpenFOAM 7: - -TBD +OpenFOAM 8 was [released](https://openfoam.org/release/8/) in July 2020 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-8), [Doxygen](https://cpp.openfoam.org/v8)). Compared to OpenFOAM 7: + +- **Function objects:** Function objects changed behavior, and the `execute()` method is now also executed at start. See the [adapter issue #179](https://github.com/precice/openfoam-adapter/issues/179) and [PR #180](https://github.com/precice/openfoam-adapter/pull/180). + - In the beginning of `preciceAdapterFunctionObject::read()`, add `this->executeAtStart_ = false;`. +- **Thermophysical models:** Some properties were moved from the previous `TurbulenceModels` and `transportModels` to the new `ThermophysicalTransportModels` and `MomentumTransportModels`. + - In `Make/options`, replace the following include paths: + - Remove the include paths to `transportModels/incompressible`, `transportModels/compressible`, `transportModels/twoPhaseMixture`, `transportModels/interfaceProperties`, `transportModels/immiscibleIncompressibleTwoPhaseMixture`, `TurbulenceModels/turbulenceModels`, `TurbulenceModels/compressible`, `TurbulenceModels/incompressible`. + - Add include paths to `ThermophysicalTransportModels`, `MomentumTransportModels/momentumTransportModels`, `MomentumTransportModels/compressible`, `MomentumTransportModels/incompressible`, `transportModels`. + - Remove the linking paths to `compressibleTurbulenceModels`, `incompressibleTurbulenceModels`. + - Add linking paths to `thermophysicalTransportModels`, `fluidThermoMomentumTransportModels`, `incompressibleMomentumTransportModels`. + - In `CHT/KappaEffective.H`: + - Remove the header inclusions `turbulentFluidThermoModel.H`, `turbulentTransportModel.H`. + - Include the headers `fluidThermoMomentumTransportModel.H`, `kinematicMomentumTransportModel.H`, `thermophysicalTransportModel.H`. + - Remove the variable declarations for `turbulence_` (2x), `nameRho_`, `nameCp_`, `namePr_`, `nameAlphat_`, `rho_`, `Cp_`, `Pr_` from the compressible and incompressible variants. + - In the incompressible variant's constructor signature, remove the `nameRho`, `nameCp`, `namePr`, `nameAlphat`. + - Add a new declaration: `const Foam::thermophysicalTransportModel& thermophysicalTransportModel_;` for each one of the `turbulence_` removed. + - In `CHT/KappaEffective.C`: + - Replace all instances of `turbulence_` with `thermophysicalTransportModel_` and update the respective comments. + - Replace `compressible::turbulenceModel` and `incompressible::turbulenceModel` with `thermophysicalTransportModel`. + - Replace `turbulenceModel::propertiesName` with `thermophysicalTransportModel::typeName`. + - In the incompressible variant, remove all lines of code working with `nameRho_`, `nameCp_`, `namePr_`, `nameAlphat_` from the constructor (which ends up with an empty body) and the `extract()` method. Replace the usage of `kappaEff_temp` with `thermophysicalTransportModel_.kappaEff()().boundaryField()[patchID]`. + - Replace the `const dictionary& CHTDict` with `const dictionary CHTDict`. + - In `CHT/HeatFlux.C` and in `CHT/HeatTransferCoefficient.C`: + - Replace `KappaEff_Incompressible(mesh, nameRho, nameCp, namePr, nameAlphat)` with `KappaEff_Incompressible(mesh)`. + - In `FSI/ForceBase.H`: + - Remove the header inclusions `immiscibleIncompressibleTwoPhaseMixture.H`, `turbulentFluidThermoModel.H`, `turbulentTransportModel.H`. + - Include the headers `fluidThermoMomentumTransportModel.H`, `kinematicMomentumTransportModel.H`. + - In `FSI/ForceBase.C`, in the `ForceBase::devRhoReff()`: + - Replace `compressible::turbulenceModel` with `compressible::momentumTransportModel`. + - Replace `incompressible::turbulenceModel` with `incompressible::momentumTransportModel`. + - Replace `cmpTurbModel::propertiesName` with `cmpTurbModel::typeName`. + - Replace `turb(mesh_.lookupObject<>())` with `turb = mesh_.lookupObject<>()` (where `const cmpTurbModel& turb`). + - Replace `turb.devRhoReff()` with `turb.devTau()`. + - Replace `turb.devReff()` with `turb.devSigma()`. + - Replace `U(mesh_.lookupObject<>())` with `U = mesh_.lookupObject<>()` (where `const volVectorField& U`). + - In `FSI/ForceBase.C`, in the `ForceBase::mu()`: + - Remove the line `typedef immiscibleIncompressibleTwoPhaseMixture iitpMixture;`. + - Replace the type `iitpMixture` with `fluidThermo` and rename the respective object from `mixture` to `thermo`. + - Replace `"mixture"` in the lookups with `basicThermo::dictName`. ### OpenFOAM 9 From a5408457545c1d9d227f6418bb5d626e7bad9cfb Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 11 Feb 2025 17:00:44 +0100 Subject: [PATCH 06/12] Document differences in OpenFOAM 9 --- docs/openfoam-support.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/openfoam-support.md b/docs/openfoam-support.md index e1da9d74..931a340e 100644 --- a/docs/openfoam-support.md +++ b/docs/openfoam-support.md @@ -145,7 +145,20 @@ OpenFOAM 8 was [released](https://openfoam.org/release/8/) in July 2020 ([GitHub OpenFOAM 9 was [released](https://openfoam.org/release/9/) in July 2021 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-9), [Doxygen](https://cpp.openfoam.org/v9)). Compared to OpenFOAM 8: -TBD +- **Function objects:** The `setTimeStep()` method was removed. + - Remove the method from the `preciceAdapterFunctionObject.H` and `preciceAdapterFunctionObject.C`. Adjust the comments for the equivalent method in `Adapter.H`. + - **Impact:** None expected. preCICE can still adjust the time step size of OpenFOAM and the adapter should still read the updated time step size of OpenFOAM inside `execute()`. +- **Thermophysical models:** Different libraries need to be linked and different headers need to be included: + - In `Make/options`, remove the linking of `fluidThermoMomentumTransportModels` and `incompressibleMomentumTransportModels`. + - In `Make/options`, link to `transportModels`, `momentumTransportModels`, `incompressibleMomentumTransportModels`, `compressibleMomentumTransportModels`. + - In `CHT/KappaEffective.H`, replace the headers `fluidThermoMomentumTransportModel.H` and `kinematicMomentumTransportModel.H` with `momentumTransportModel.H`. + - In `FSI/ForceBase.H`, replace the header `fluidThermoMomentumTransportModel.H` with `compressibleMomentumTransportModel.H`. + - In `FSI/ForceBase.C`, add the header `fluidThermo.H`. + - In `FSI/ForceBase.C`, replace: + - `compressible::momentumTransportModel` with `compressibleMomentumTransportModel` + - `incompressible::momentumTransportModel` with `incompressibleMomentumTransportModel`. Further down, replace the usage `const incompressible::momentumTransportModel&` with `const icoTurbModel&`. +- **Triangulation:** In `Adapter.C`: + - Replace the header `faceTriangulation.H` with `polygonTriangulate.H`. ### OpenFOAM 10 From 2f1f8653b00ad66a6cd48833f8a80906917ffd2b Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 11 Feb 2025 21:58:42 +0100 Subject: [PATCH 07/12] Add differences for OpenFOAM 10 --- docs/openfoam-support.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/openfoam-support.md b/docs/openfoam-support.md index 931a340e..9866ea66 100644 --- a/docs/openfoam-support.md +++ b/docs/openfoam-support.md @@ -164,7 +164,23 @@ OpenFOAM 9 was [released](https://openfoam.org/release/9/) in July 2021 ([GitHub OpenFOAM 10 was [released](https://openfoam.org/release/10/) in July 2022 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-10), [Doxygen](https://cpp.openfoam.org/v10)). Compared to OpenFOAM 9: -TBD +- **Function objects:** The method `fields()` has been made pure virtual, meaning it needs to be implemented. + - In `preciceAdapterFunctionObject.H`, implement it as (more of a workaround to avoid implementation): + + ```c++ + virtual wordList fields() const + { + return wordList::null(); + } + ``` + +- **Physical properties and models:** The `physicalProperties` was replaced by `transportModels`. + - In `Make/options`, replace `physicalProperties` with `transportModels` in the included paths and in the linked libraries. + - In `FSI/ForceBase.H`, replace `kinematicMomentumTransportModel.H` with `incompressibleMomentumTransportModel.H`. + - In `FSI/ForceBase.C`, replace `basicThermo::dictName` with `physicalProperties::typeName`. +- **Fields `V0` and `V00`:** The fields `V0` and `V00` have been removed or renamed (not sure to what). + - In `Adapter.C`, method `preciceAdapter::Adapter::setupMeshVolCheckpointing()`, guard each of these two fields with a `if (mesh_.foundObject("V0"))` (and `if (... ("V00"))`, respectively). Alternatively, remove the implementation of this method altogether. + - **Impact:** This might lead to stability issues in FSI simulations with implicit coupling. Check your results. ### OpenFOAM 11 From bd096fcb21e81aaeee1ecea08181af16d351ba69 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 11 Feb 2025 22:06:47 +0100 Subject: [PATCH 08/12] Add links to related PRs in the adapter --- docs/openfoam-support.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/openfoam-support.md b/docs/openfoam-support.md index 9866ea66..baec6b9b 100644 --- a/docs/openfoam-support.md +++ b/docs/openfoam-support.md @@ -92,6 +92,8 @@ OpenFOAM 6 was [released](https://openfoam.org/release/6/) in July 2018 ([GitHub - **setDeltaT:** The `Time` method `setDeltaT(..., false)` was replaced by `setDeltaTNoAdjust(...)`. - Replace `setDeltaT(timestepSolver_, false)` with `setDeltaTNoAdjust(timestepSolver_)`. +Related work in the adapter: [PR #33](https://github.com/precice/openfoam-adapter/pull/33). + ### OpenFOAM 7 OpenFOAM 7 was [released](https://openfoam.org/release/7/) in July 2019 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-7), [Doxygen](https://cpp.openfoam.org/v7)). Compared to OpenFOAM 6: @@ -99,6 +101,8 @@ OpenFOAM 7 was [released](https://openfoam.org/release/7/) in July 2019 ([GitHub - **fileName:** `fileName::DIRECTORY` was renamed to `fileType::directory`. - Replace this in the `Adapter.C`. +Related work in the adapter: [PR #91](https://github.com/precice/openfoam-adapter/pull/91). + ### OpenFOAM 8 OpenFOAM 8 was [released](https://openfoam.org/release/8/) in July 2020 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-8), [Doxygen](https://cpp.openfoam.org/v8)). Compared to OpenFOAM 7: @@ -141,6 +145,8 @@ OpenFOAM 8 was [released](https://openfoam.org/release/8/) in July 2020 ([GitHub - Replace the type `iitpMixture` with `fluidThermo` and rename the respective object from `mixture` to `thermo`. - Replace `"mixture"` in the lookups with `basicThermo::dictName`. +Related work in the adapter: [PR #130](https://github.com/precice/openfoam-adapter/pull/130). + ### OpenFOAM 9 OpenFOAM 9 was [released](https://openfoam.org/release/9/) in July 2021 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-9), [Doxygen](https://cpp.openfoam.org/v9)). Compared to OpenFOAM 8: @@ -160,6 +166,8 @@ OpenFOAM 9 was [released](https://openfoam.org/release/9/) in July 2021 ([GitHub - **Triangulation:** In `Adapter.C`: - Replace the header `faceTriangulation.H` with `polygonTriangulate.H`. +Related work in the adapter: [PR #221](https://github.com/precice/openfoam-adapter/pull/221). + ### OpenFOAM 10 OpenFOAM 10 was [released](https://openfoam.org/release/10/) in July 2022 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-10), [Doxygen](https://cpp.openfoam.org/v10)). Compared to OpenFOAM 9: @@ -188,6 +196,8 @@ OpenFOAM 11 was [released](https://openfoam.org/release/11/) in July 2023 ([GitH TBD +Related work in the adapter: [PR #310](https://github.com/precice/openfoam-adapter/pull/310). + ### OpenFOAM 12 OpenFOAM 12 was [released](https://openfoam.org/release/12/) in July 2024 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-12), [Doxygen](https://cpp.openfoam.org/v12)). Compared to OpenFOAM 11: From 90d5e5c5ac5391d640f85fed73fd3d4a845ff17e Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 11 Feb 2025 22:09:49 +0100 Subject: [PATCH 09/12] Add calls for help for OpenFOAM 11 and 12 --- docs/openfoam-support.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/openfoam-support.md b/docs/openfoam-support.md index baec6b9b..5be8a3df 100644 --- a/docs/openfoam-support.md +++ b/docs/openfoam-support.md @@ -192,17 +192,13 @@ OpenFOAM 10 was [released](https://openfoam.org/release/10/) in July 2022 ([GitH ### OpenFOAM 11 -OpenFOAM 11 was [released](https://openfoam.org/release/11/) in July 2023 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-11), [Doxygen](https://cpp.openfoam.org/v11)). Compared to OpenFOAM 10: - -TBD +OpenFOAM 11 was [released](https://openfoam.org/release/11/) in July 2023 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-11), [Doxygen](https://cpp.openfoam.org/v11)). We do not yet know which are relevant changes. Please help us port the adapter to OpenFOAM 11. Related work in the adapter: [PR #310](https://github.com/precice/openfoam-adapter/pull/310). ### OpenFOAM 12 -OpenFOAM 12 was [released](https://openfoam.org/release/12/) in July 2024 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-12), [Doxygen](https://cpp.openfoam.org/v12)). Compared to OpenFOAM 11: - -TBD +OpenFOAM 12 was [released](https://openfoam.org/release/12/) in July 2024 ([GitHub mirror](https://github.com/OpenFOAM/OpenFOAM-12), [Doxygen](https://cpp.openfoam.org/v12)). We do not yet know which are relevant changes. Please help us port the adapter to OpenFOAM 12. ### foam-extend From 24584695f1772c04cc9e075b5e5069d017e80652 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 11 Feb 2025 22:12:41 +0100 Subject: [PATCH 10/12] Add note for foam-extend --- docs/openfoam-support.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/openfoam-support.md b/docs/openfoam-support.md index 5be8a3df..1120d5c9 100644 --- a/docs/openfoam-support.md +++ b/docs/openfoam-support.md @@ -202,6 +202,10 @@ OpenFOAM 12 was [released](https://openfoam.org/release/12/) in July 2024 ([GitH ### foam-extend +We have not yet documented all related changes that would make the adapter work for foam-extend. See the repository [`precice/foam-extend-adapter`](https://github.com/precice/foam-extend-adapter) for the latest state and please contribute to this page. + +Related work in the adapter: [PR #302](https://github.com/precice/openfoam-adapter/pull/302). + ## Notes on OpenFOAM features ### End of the simulation From f15b23530831ea76fe1c9ddb53b6f71b31b59640 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 11 Feb 2025 22:19:40 +0100 Subject: [PATCH 11/12] Add changelog entry --- changelog-entries/351.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog-entries/351.md diff --git a/changelog-entries/351.md b/changelog-entries/351.md new file mode 100644 index 00000000..0c041c2b --- /dev/null +++ b/changelog-entries/351.md @@ -0,0 +1 @@ +- Documented relevant differences between OpenFOAM versions, to make porting between versions easier. [#351](https://github.com/precice/openfoam-adapter/pull/351) \ No newline at end of file From 0d0c2107ff73d0aa20920e3618be8e25afc080c7 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Tue, 11 Feb 2025 22:33:15 +0100 Subject: [PATCH 12/12] Move notes for tutorials into the new section --- docs/openfoam-support.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/openfoam-support.md b/docs/openfoam-support.md index 1120d5c9..a2e8c541 100644 --- a/docs/openfoam-support.md +++ b/docs/openfoam-support.md @@ -35,20 +35,13 @@ We provide version-specific [release archives](https://github.com/precice/openfo - OpenCFD / ESI (openfoam.com) - main focus: - [OpenFOAM v1812-v2412](https://github.com/precice/openfoam-adapter) or newer - - OpenFOAM v2212 and newer is only supported since v1.2.2 of the adapter. - [OpenFOAM v1612-v1806](https://github.com/precice/openfoam-adapter/tree/OpenFOAMv1806) (not tested) - OpenFOAM Foundation (openfoam.org) - secondary, consider experimental: - [OpenFOAM 10](https://github.com/precice/openfoam-adapter/tree/OpenFOAM10) - - Several [changes to the tutorials](https://github.com/precice/tutorials/tree/OpenFOAM10) are also needed, read the [discussion](https://github.com/precice/tutorials/pull/283). - - Same limitations as for OpenFOAM 9. - [OpenFOAM 9](https://github.com/precice/openfoam-adapter/tree/OpenFOAM9) - - Rename `solver` to `motionSolver` in `constant/dynamicMeshDict`. - - Modify also `residualControl` to `outerCorrectorResidualControl` in `system/fvSolution`. - - Limitations in adjustable time step size ([#261](https://github.com/precice/openfoam-adapter/issues/261)). - [OpenFOAM 8](https://github.com/precice/openfoam-adapter/tree/OpenFOAM8) - [OpenFOAM 7](https://github.com/precice/openfoam-adapter/tree/OpenFOAM7) - [OpenFOAM 6](https://github.com/precice/openfoam-adapter/tree/OpenFOAM6) - - Modify also `residualControl` to `outerResidualControl` in `system/fvSolution`. - [OpenFOAM 5.x](https://github.com/precice/openfoam-adapter/tree/OpenFOAM5) - [OpenFOAM 4.0/4.1](https://github.com/precice/openfoam-adapter/tree/OpenFOAM4) (not tested) @@ -91,6 +84,8 @@ OpenFOAM 6 was [released](https://openfoam.org/release/6/) in July 2018 ([GitHub - Replace `adjustTimeStep()` with `setTimeStep()`, both for the function object and the adapter members. - **setDeltaT:** The `Time` method `setDeltaT(..., false)` was replaced by `setDeltaTNoAdjust(...)`. - Replace `setDeltaT(timestepSolver_, false)` with `setDeltaTNoAdjust(timestepSolver_)`. +- **Case files:** + - In `system/fvSolution`, replace `residualControl` with `outerResidualControl`. Related work in the adapter: [PR #33](https://github.com/precice/openfoam-adapter/pull/33). @@ -153,7 +148,7 @@ OpenFOAM 9 was [released](https://openfoam.org/release/9/) in July 2021 ([GitHub - **Function objects:** The `setTimeStep()` method was removed. - Remove the method from the `preciceAdapterFunctionObject.H` and `preciceAdapterFunctionObject.C`. Adjust the comments for the equivalent method in `Adapter.H`. - - **Impact:** None expected. preCICE can still adjust the time step size of OpenFOAM and the adapter should still read the updated time step size of OpenFOAM inside `execute()`. + - **Impact:** See limitations in adjustable time step size ([#261](https://github.com/precice/openfoam-adapter/issues/261)). - **Thermophysical models:** Different libraries need to be linked and different headers need to be included: - In `Make/options`, remove the linking of `fluidThermoMomentumTransportModels` and `incompressibleMomentumTransportModels`. - In `Make/options`, link to `transportModels`, `momentumTransportModels`, `incompressibleMomentumTransportModels`, `compressibleMomentumTransportModels`. @@ -165,6 +160,9 @@ OpenFOAM 9 was [released](https://openfoam.org/release/9/) in July 2021 ([GitHub - `incompressible::momentumTransportModel` with `incompressibleMomentumTransportModel`. Further down, replace the usage `const incompressible::momentumTransportModel&` with `const icoTurbModel&`. - **Triangulation:** In `Adapter.C`: - Replace the header `faceTriangulation.H` with `polygonTriangulate.H`. +- **Case files:** + - In `constant/dynamicMeshDict`, replace `solver` with `motionSolver`. + - In `system/fvSolution`, replace `residualControl` with `outerCorrectorResidualControl`. This was already renamed to `outerResidualControl` in OpenFOAM 6. Related work in the adapter: [PR #221](https://github.com/precice/openfoam-adapter/pull/221). @@ -189,6 +187,7 @@ OpenFOAM 10 was [released](https://openfoam.org/release/10/) in July 2022 ([GitH - **Fields `V0` and `V00`:** The fields `V0` and `V00` have been removed or renamed (not sure to what). - In `Adapter.C`, method `preciceAdapter::Adapter::setupMeshVolCheckpointing()`, guard each of these two fields with a `if (mesh_.foundObject("V0"))` (and `if (... ("V00"))`, respectively). Alternatively, remove the implementation of this method altogether. - **Impact:** This might lead to stability issues in FSI simulations with implicit coupling. Check your results. +- **Case files:** Several [changes to the tutorials](https://github.com/precice/tutorials/tree/OpenFOAM10) are needed, read the [discussion](https://github.com/precice/tutorials/pull/283). ### OpenFOAM 11