Skip to content

Commit

Permalink
Merge pull request #333 from precice/develop
Browse files Browse the repository at this point in the history
Release v1.3.1
  • Loading branch information
MakisH authored Jun 27, 2024
2 parents 74b8719 + b7868a6 commit 94e78ea
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 22 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:
required: true
type: choice
options:
- OpenFOAMv2406
- OpenFOAMv2312
- OpenFOAMv2306
- OpenFOAMv2212
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build with OpenFOAM v2312
name: Build with OpenFOAM v2404
on:
push:
branches-ignore:
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/install-openfoam.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion .github/workflows/system-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Adapter.C
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion Allwmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ Read more details in the issue [#52: Releases and versioning](https://github.com

<!-- markdownlint-configure-file {"MD024": { "siblings_only": true } } -->

## [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
Expand Down
9 changes: 4 additions & 5 deletions FF/Velocity.C
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,19 @@ preciceAdapter::FF::Velocity::Velocity(
const std::string nameU,
const std::string namePhi,
bool fluxCorrection)
: U_(
const_cast<volVectorField*>(
&mesh.lookupObject<volVectorField>(nameU))),
phi_(const_cast<surfaceScalarField*>(
&mesh.lookupObject<surfaceScalarField>(namePhi))),
: phi_(const_cast<surfaceScalarField*>(
&mesh.lookupObject<surfaceScalarField>(namePhi))),
fluxCorrection_(fluxCorrection)
{
if (mesh.foundObject<volVectorField>(nameU))
{
adapterInfo("Using existing velocity object " + nameU, "debug");
U_ = const_cast<volVectorField*>(
&mesh.lookupObject<volVectorField>(nameU));
}
else
{
adapterInfo("Creating a new velocity object " + nameU, "debug");
U_ = new volVectorField(
IOobject(
nameU,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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/openfo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S01LTMtOS05LTEzLTE2YTgxIDgxIDAgMDEtNi0zMiA5NCA5NCAwIDAxOC0zNSA5MCA5MCAwIDAxNi0xMmwxLTJjNS05IDEzLTEzIDIzLTE2IDE2LTUgMzItMyA1MCA5IDEzIDggMjMgMjAgMzAgMzYgNyAxNSA3IDI5IDAgNDJ6bS00My03M2MtMTctOC0zMy02LTQ2IDUtMTAgOC0xNiAyMC0xOSAzN2E1NCA1NCAwIDAwNSAzNGM3IDE1IDIwIDIzIDM3IDIyIDIyLTEgMzgtOSA0OC0yNGE0MSA0MSAwIDAwOC0yNCA0MyA0MyAwIDAwLTEtMTJjLTYtMTgtMTYtMzEtMzItMzh6bS0yMyA5MWgtMWMtNyAwLTE0LTItMjEtN2EyNyAyNyAwIDAxLTEwLTEzIDU3IDU3IDAgMDEtNC0yMCA2MyA2MyAwIDAxNi0yNWM1LTEyIDEyLTE5IDI0LTIxIDktMyAxOC0yIDI3IDIgMTQgNiAyMyAxOCAyNyAzM3MtMiAzMS0xNiA0MGMtMTEgOC0yMSAxMS0zMiAxMXptMS0zNHYxNGgtOFY2OGg4djI4bDEwLTEwaDExbC0xNCAxNSAxNyAxOEg5NnoiLz48L3N2Zz4K)](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)

Expand Down
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions docs/openfoam-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tools/create-release-archives.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 94e78ea

Please sign in to comment.