From 3310aaeeeec4f797538aa54378fa3b3ae23b5acc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Simonis?= Date: Wed, 22 May 2024 10:41:39 +0200 Subject: [PATCH 1/8] Remove www prefix from precice.org (#329) --- Allwmake | 2 +- docs/config.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Allwmake b/Allwmake index d74d9fcd..2480fe64 100755 --- a/Allwmake +++ b/Allwmake @@ -20,7 +20,7 @@ adapter_build_command(){ ADAPTER_TARGET_DIR="${FOAM_USER_LIBBIN:-}" # More information for compatibility with OpenFOAM -DOC_COMPATIBILITY="https://www.precice.org/adapter-openfoam-support.html" +DOC_COMPATIBILITY="https://precice.org/adapter-openfoam-support.html" ################################################################################ # Function to print to screen and copy to a logfile diff --git a/docs/config.md b/docs/config.md index 7f22c51a..ae0b7d4d 100644 --- a/docs/config.md +++ b/docs/config.md @@ -7,7 +7,7 @@ summary: "Write a system/preciceDict, set compatible boundary conditions, and ac In order to run a coupled simulation, you need to: -1. prepare a preCICE configuration file (described in the [preCICE configuration](https://www.precice.org/configuration-overview.html)), +1. prepare a preCICE configuration file (described in the [preCICE configuration](https://precice.org/configuration-overview.html)), 2. prepare an adapter's configuration file, 3. set the coupling boundaries in the OpenFOAM case, 4. load the adapter, and From 74fb301311f378d8f96ff4ca70e66e0da82383f8 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Wed, 19 Jun 2024 17:14:52 +0200 Subject: [PATCH 2/8] Skip velocity object from the initializer list (#330) --- FF/Velocity.C | 9 ++++----- changelog-entries/330.md | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 changelog-entries/330.md diff --git a/FF/Velocity.C b/FF/Velocity.C index 28092919..f9ecfe61 100644 --- a/FF/Velocity.C +++ b/FF/Velocity.C @@ -8,20 +8,19 @@ preciceAdapter::FF::Velocity::Velocity( const std::string nameU, const std::string namePhi, bool fluxCorrection) -: U_( - const_cast( - &mesh.lookupObject(nameU))), - phi_(const_cast( - &mesh.lookupObject(namePhi))), +: phi_(const_cast( + &mesh.lookupObject(namePhi))), fluxCorrection_(fluxCorrection) { if (mesh.foundObject(nameU)) { + adapterInfo("Using existing velocity object " + nameU, "debug"); U_ = const_cast( &mesh.lookupObject(nameU)); } else { + adapterInfo("Creating a new velocity object " + nameU, "debug"); U_ = new volVectorField( IOobject( nameU, diff --git a/changelog-entries/330.md b/changelog-entries/330.md new file mode 100644 index 00000000..5dce487f --- /dev/null +++ b/changelog-entries/330.md @@ -0,0 +1 @@ +- Fixed looking for velocity object that should first be created by the adapter [#330](https://github.com/precice/openfoam-adapter/pull/330). From e379848e085134a698c4d6d182e0756a9bf85b06 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Thu, 20 Jun 2024 15:24:30 +0200 Subject: [PATCH 3/8] Add clang-format pre-commit hook (#331) --- .pre-commit-config.yaml | 4 ++++ changelog-entries/331.md | 1 + 2 files changed, 5 insertions(+) create mode 100644 changelog-entries/331.md diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f3554f66..8f6d7347 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,6 +6,10 @@ repos: - id: format-precice-config - id: check-image-prefix args: [ --prefix=docs-adapter-openfoam- ] +- repo: https://github.com/pre-commit/mirrors-clang-format + rev: 'v11.1.0' + hooks: + - id: clang-format - repo: https://github.com/igorshubovych/markdownlint-cli rev: v0.30.0 hooks: diff --git a/changelog-entries/331.md b/changelog-entries/331.md new file mode 100644 index 00000000..aa3d77a9 --- /dev/null +++ b/changelog-entries/331.md @@ -0,0 +1 @@ +- Added clang-format to the pre-commit hook [#331](https://github.com/precice/openfoam-adapter/pull/331). From 172753f73218d40ca6761c3a6e1e19371b8cb117 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Thu, 27 Jun 2024 07:43:08 +0200 Subject: [PATCH 4/8] Add OpenFOAM v2406 to the supported versions (#332) --- .github/workflows/build-custom.yml | 5 +++++ .github/workflows/build.yml | 4 ++-- .github/workflows/install-openfoam.sh | 4 ++-- README.md | 2 +- changelog-entries/332.md | 1 + docs/openfoam-support.md | 8 ++++---- 6 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 changelog-entries/332.md diff --git a/.github/workflows/build-custom.yml b/.github/workflows/build-custom.yml index eec2d4ed..7287a92c 100644 --- a/.github/workflows/build-custom.yml +++ b/.github/workflows/build-custom.yml @@ -20,6 +20,7 @@ on: required: true type: choice options: + - OpenFOAMv2406 - OpenFOAMv2312 - OpenFOAMv2306 - OpenFOAMv2212 @@ -86,6 +87,10 @@ jobs: id: installOpenFOAM run: | case "${{ github.event.inputs.versionOpenFOAM }}" in + OpenFOAMv2406) + wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash + sudo apt-get install openfoam2406-dev + echo "{openfoam_exec}={/usr/bin/openfoam2406}" >> $GITHUB_OUTPUT;; OpenFOAMv2312) wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash sudo apt-get install openfoam2312-dev diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5b6b5927..a5a79a0b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build with OpenFOAM v2312 +name: Build with OpenFOAM v2404 on: push: branches-ignore: @@ -44,4 +44,4 @@ jobs: snapshot: '/' exclude: '/boot /data /dev /mnt /proc /run /sys' - name: Build OpenFOAM-preCICE adapter - run: /usr/bin/openfoam2312 ./Allwmake + run: /usr/bin/openfoam2406 ./Allwmake diff --git a/.github/workflows/install-openfoam.sh b/.github/workflows/install-openfoam.sh index 3b132427..6a97a0e1 100755 --- a/.github/workflows/install-openfoam.sh +++ b/.github/workflows/install-openfoam.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -# Install OpenFOAM v2312 +# Install OpenFOAM v2406 wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash sudo apt-get update -y -sudo apt-get install -y openfoam2312-dev +sudo apt-get install -y openfoam2406-dev diff --git a/README.md b/README.md index b4578250..caa2ba96 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # OpenFOAM-preCICE adapter [![Ask questions in the forum](https://img.shields.io/badge/community-discourse_forum-orange?link=https%3A%2F%2Fprecice.discourse.group%2F)](https://precice.discourse.group/) -[![Build with OpenFOAM v2312](https://github.com/precice/openfoam-adapter/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/precice/openfoam-adapter/actions/workflows/build.yml) +[![Build with OpenFOAM v2404](https://github.com/precice/openfoam-adapter/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/precice/openfoam-adapter/actions/workflows/build.yml) [![Changelog](https://img.shields.io/badge/Keep%20a%20Changelog--555.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9IiNmMTVkMzAiIHZpZXdCb3g9IjAgMCAxODcgMTg1Ij48cGF0aCBkPSJNNjIgN2MtMTUgMy0yOCAxMC0zNyAyMmExMjIgMTIyIDAgMDAtMTggOTEgNzQgNzQgMCAwMDE2IDM4YzYgOSAxNCAxNSAyNCAxOGE4OSA4OSAwIDAwMjQgNCA0NSA0NSAwIDAwNiAwbDMtMSAxMy0xYTE1OCAxNTggMCAwMDU1LTE3IDYzIDYzIDAgMDAzNS01MiAzNCAzNCAwIDAwLTEtNWMtMy0xOC05LTMzLTE5LTQ3LTEyLTE3LTI0LTI4LTM4LTM3QTg1IDg1IDAgMDA2MiA3em0zMCA4YzIwIDQgMzggMTQgNTMgMzEgMTcgMTggMjYgMzcgMjkgNTh2MTJjLTMgMTctMTMgMzAtMjggMzhhMTU1IDE1NSAwIDAxLTUzIDE2bC0xMyAyaC0xYTUxIDUxIDAgMDEtMTItMWwtMTctMmMtMTMtNC0yMy0xMi0yOS0yNy01LTEyLTgtMjQtOC0zOWExMzMgMTMzIDAgMDE4LTUwYzUtMTMgMTEtMjYgMjYtMzMgMTQtNyAyOS05IDQ1LTV6TTQwIDQ1YTk0IDk0IDAgMDAtMTcgNTQgNzUgNzUgMCAwMDYgMzJjOCAxOSAyMiAzMSA0MiAzMiAyMSAyIDQxLTIgNjAtMTRhNjAgNjAgMCAwMDIxLTE5IDUzIDUzIDAgMDA5LTI5YzAtMTYtOC0zMy0yMy01MWE0NyA0NyAwIDAwLTUtNWMtMjMtMjAtNDUtMjYtNjctMTgtMTIgNC0yMCA5LTI2IDE4em0xMDggNzZhNTAgNTAgMCAwMS0yMSAyMmMtMTcgOS0zMiAxMy00OCAxMy0xMSAwLTIxLTMtMzAtOS01LTMtOS05LTEzLTE2YTgxIDgxIDAgMDEtNi0zMiA5NCA5NCAwIDAxOC0zNSA5MCA5MCAwIDAxNi0xMmwxLTJjNS05IDEzLTEzIDIzLTE2IDE2LTUgMzItMyA1MCA5IDEzIDggMjMgMjAgMzAgMzYgNyAxNSA3IDI5IDAgNDJ6bS00My03M2MtMTctOC0zMy02LTQ2IDUtMTAgOC0xNiAyMC0xOSAzN2E1NCA1NCAwIDAwNSAzNGM3IDE1IDIwIDIzIDM3IDIyIDIyLTEgMzgtOSA0OC0yNGE0MSA0MSAwIDAwOC0yNCA0MyA0MyAwIDAwLTEtMTJjLTYtMTgtMTYtMzEtMzItMzh6bS0yMyA5MWgtMWMtNyAwLTE0LTItMjEtN2EyNyAyNyAwIDAxLTEwLTEzIDU3IDU3IDAgMDEtNC0yMCA2MyA2MyAwIDAxNi0yNWM1LTEyIDEyLTE5IDI0LTIxIDktMyAxOC0yIDI3IDIgMTQgNiAyMyAxOCAyNyAzM3MtMiAzMS0xNiA0MGMtMTEgOC0yMSAxMS0zMiAxMXptMS0zNHYxNGgtOFY2OGg4djI4bDEwLTEwaDExbC0xNCAxNSAxNyAxOEg5NnoiLz48L3N2Zz4K)](https://github.com/precice/openfoam-adapter/blob/develop/CHANGELOG.md) [![License](https://img.shields.io/github/license/precice/openfoam-adapter.svg)](https://github.com/precice/openfoam-adapter/blob/master/LICENSE) diff --git a/changelog-entries/332.md b/changelog-entries/332.md new file mode 100644 index 00000000..eb845849 --- /dev/null +++ b/changelog-entries/332.md @@ -0,0 +1 @@ +- Added OpenFOAM v2406 to the supported versions [#332](https://github.com/precice/openfoam-adapter/pull/332). diff --git a/docs/openfoam-support.md b/docs/openfoam-support.md index fb8fc0df..dbad735a 100644 --- a/docs/openfoam-support.md +++ b/docs/openfoam-support.md @@ -7,14 +7,14 @@ summary: Recent OpenFOAM.com versions work out-of-the-box. Recent OpenFOAM.org v ## How to get OpenFOAM -The easiest way to start is to get binary packages for your Linux distribution. For example, to [get OpenFOAM v2312 on Ubuntu](https://develop.openfoam.com/Development/openfoam/-/wikis/precompiled/debian#precompiled-packages-debianubuntu): +The easiest way to start is to get binary packages for your Linux distribution. For example, to [get OpenFOAM v2406 on Ubuntu](https://develop.openfoam.com/Development/openfoam/-/wikis/precompiled/debian#precompiled-packages-debianubuntu): ```bash # Add the signing key, add the repository, update: wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash -# Install OpenFOAM v2312: -sudo apt-get install openfoam2312-dev +# Install OpenFOAM v2406: +sudo apt-get install openfoam2406-dev ``` As these steps change your `.profile`, you need to log out and in again to make OpenFOAM fully discoverable. @@ -26,7 +26,7 @@ OpenFOAM is a project with long history and many forks, of which we try to suppo We provide version-specific [release archives](https://github.com/precice/openfoam-adapter/releases/latest) and respective Git branches for: - OpenCFD / ESI (openfoam.com) - main focus: - - [OpenFOAM v1812-v2312](https://github.com/precice/openfoam-adapter) or newer + - [OpenFOAM v1812-v2406](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: From 374a01679a1c46320268f8a938bafb0debd60ab2 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Thu, 27 Jun 2024 07:51:28 +0200 Subject: [PATCH 5/8] Clarify the type of gradients supported (#334) --- docs/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/README.md b/docs/README.md index cb5e6671..106bb92a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -15,7 +15,7 @@ This preCICE adapter is a plug-in (function object) for OpenFOAM, which can work This adapter can read/write the following fields in a surface coupling setup: - Temperature (read + write) -- Temperature gradient (read + write) +- Temperature surface-normal gradient (read + write) - Heat flux (read + write) - Sink temperature (read + write) - Heat transfer coefficient (read + write) @@ -24,9 +24,9 @@ This adapter can read/write the following fields in a surface coupling setup: - Displacement (read + write) - Displacement delta (read) - Pressure (read + write) -- Pressure gradient (read + write) +- Pressure surface-normal gradient (read + write) - Velocity (read + write) -- Velocity gradient (read + write) +- Velocity surface-normal gradient (read + write) - Phase fraction (alpha) (read + write) - Phase fraction (alpha) gradient (read + write) - Phase flux (phi) (read + write) From 2a9d699886f05a43bcdbf62e44b4132533883392 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Thu, 27 Jun 2024 11:27:34 +0200 Subject: [PATCH 6/8] Update preCICE version used in system tests --- .github/workflows/system-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/system-tests.yaml b/.github/workflows/system-tests.yaml index e6e6145f..90fa4709 100644 --- a/.github/workflows/system-tests.yaml +++ b/.github/workflows/system-tests.yaml @@ -24,6 +24,6 @@ jobs: uses: precice/tutorials/.github/workflows/run_testsuite_workflow.yml@develop with: suites: openfoam_adapter_pr - build_args: TUTORIALS_REF:${{ needs.gather-refs.outputs.reftutorials }},PRECICE_REF:v3.0.0,OPENFOAM_EXECUTABLE:openfoam2312,OPENFOAM_ADAPTER_REF:${{ github.event.pull_request.head.sha }} + build_args: TUTORIALS_REF:${{ needs.gather-refs.outputs.reftutorials }},PRECICE_REF:v3.1.1,OPENFOAM_EXECUTABLE:openfoam2312,OPENFOAM_ADAPTER_REF:${{ github.event.pull_request.head.sha }} systests_branch: develop loglevel: "DEBUG" From 99f4d1c14f5df1644dcfdeff14844af509d8c74d Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Thu, 27 Jun 2024 07:57:31 +0200 Subject: [PATCH 7/8] Changelog for v1.3.1 --- CHANGELOG.md | 11 +++++++++++ changelog-entries/330.md | 1 - changelog-entries/331.md | 1 - changelog-entries/332.md | 1 - 4 files changed, 11 insertions(+), 3 deletions(-) delete mode 100644 changelog-entries/330.md delete mode 100644 changelog-entries/331.md delete mode 100644 changelog-entries/332.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 264c5c7b..90bb8b66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,17 @@ Read more details in the issue [#52: Releases and versioning](https://github.com +## [v1.3.1] 2024-07-27 + +### Fixed + +- Fixed looking for velocity object that should first be created by the adapter [#330](https://github.com/precice/openfoam-adapter/pull/330). + +### Added + +- Added clang-format to the pre-commit hook [#331](https://github.com/precice/openfoam-adapter/pull/331). +- Added OpenFOAM v2406 to the supported versions (earlier versions already support it as well) [#332](https://github.com/precice/openfoam-adapter/pull/332). + ## [v1.3.0] 2024-03-20 ### Added diff --git a/changelog-entries/330.md b/changelog-entries/330.md deleted file mode 100644 index 5dce487f..00000000 --- a/changelog-entries/330.md +++ /dev/null @@ -1 +0,0 @@ -- Fixed looking for velocity object that should first be created by the adapter [#330](https://github.com/precice/openfoam-adapter/pull/330). diff --git a/changelog-entries/331.md b/changelog-entries/331.md deleted file mode 100644 index aa3d77a9..00000000 --- a/changelog-entries/331.md +++ /dev/null @@ -1 +0,0 @@ -- Added clang-format to the pre-commit hook [#331](https://github.com/precice/openfoam-adapter/pull/331). diff --git a/changelog-entries/332.md b/changelog-entries/332.md deleted file mode 100644 index eb845849..00000000 --- a/changelog-entries/332.md +++ /dev/null @@ -1 +0,0 @@ -- Added OpenFOAM v2406 to the supported versions [#332](https://github.com/precice/openfoam-adapter/pull/332). From b7868a6374f2899c2c6f1afe200ecb8c1d3f1e38 Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Thu, 27 Jun 2024 07:58:11 +0200 Subject: [PATCH 8/8] Bump version to 1.3.1 --- Adapter.C | 2 +- tools/create-release-archives.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Adapter.C b/Adapter.C index 203a4f15..d3a10962 100644 --- a/Adapter.C +++ b/Adapter.C @@ -10,7 +10,7 @@ preciceAdapter::Adapter::Adapter(const Time& runTime, const fvMesh& mesh) : runTime_(runTime), mesh_(mesh) { - adapterInfo("Loaded the OpenFOAM-preCICE adapter - v1.3.0.", "info"); + adapterInfo("Loaded the OpenFOAM-preCICE adapter - v1.3.1.", "info"); return; } diff --git a/tools/create-release-archives.sh b/tools/create-release-archives.sh index 7287ffae..ff284a65 100755 --- a/tools/create-release-archives.sh +++ b/tools/create-release-archives.sh @@ -4,7 +4,7 @@ set -u remote_name=origin -adapter_version="v1.3.0" +adapter_version="v1.3.1" # Declare branch names for which archives will be created declare -a branches=("master" "OpenFOAMv1806" "OpenFOAM10" "OpenFOAM9" "OpenFOAM8" "OpenFOAM7" "OpenFOAM6" "OpenFOAM5")