Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions perpendicular-flap/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ cases:
run: ./run.sh
component: openfoam-adapter

# solid-solids4foam:
# participant: Solid
# directory: ./solid-solids4foam
# run: ./run.sh
# component: openfoam-adapter
solid-solids4foam:
participant: Solid
directory: ./solid-solids4foam
run: ./run.sh
component: solids4foam
Git LFS file not shown
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,32 @@ We also include some information on the machine used to generate them

| name | time | sha256 |
|------|------|-------|
| fluid-openfoam_solid-dune.tar.gz | 2026-07-08 13:13:57 | 06408d6dac453863c981a733defbe3bc807f1bc2fb15d04f2551060dd010692b |
| fluid-openfoam_solid-solids4foam.tar.gz | 2026-07-10 18:05:57 | 29e4d0f83bc001b8ccd6eecda3b77f5b6a9b8b1c1dd36b42bbb0ae055181db6c |

## List of arguments used to generate the files

| name | value |
|------|------|
| PLATFORM | ubuntu_2404 |
| CALCULIX_VERSION | 2.20 |
| DUNE_VERSION | 2.9 |
| DUMUX_VERSION | 3.7 |
| DUNE_VERSION_DUMUX | 2.9 |
| DUNE_VERSION_DUNE | 2.9 |
| OPENFOAM_EXECUTABLE | openfoam2512 |
| SU2_VERSION | 7.5.1 |
| FENICS_ADAPTER_REF | v2.3.0 |
| FENICSX_ADAPTER_REF | v1.0.1 |
| FMI_RUNNER_REF | v0.2.1 |
| CALCULIX_ADAPTER_REF | v2.20.1 |
| DEALII_ADAPTER_REF | a421d92 |
| DUNE_ADAPTER_REF | 778d3bb |
| DUMUX_ADAPTER_REF | 3f3f54f |
| MICRO_MANAGER_REF | bf5ea7b |
| OPENFOAM_ADAPTER_REF | 2c3062c |
| PRECICE_REF | b770460f2447b94da430086085d6b424e7c073e9 |
| PYTHON_BINDINGS_REF | v3.4.0 |
| SU2_ADAPTER_REF | 5abe79b |
| TUTORIALS_REF | 54cd04a8e5aa8f4efdce53785d298c115e7e287a |
| TUTORIALS_REF | d7b5ca1cd4219d42441c5b3266d741dcf70e706e |
| PRECICE_PRESET | production-audit |
| PRECICE_UID | 1003 |
| PRECICE_GID | 1003 |
Expand Down
4 changes: 2 additions & 2 deletions perpendicular-flap/solid-solids4foam/system/fvSchemes

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cherry-picked #872 for testing. Revert / update.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ddtSchemes

gradSchemes
{
default extendedLeastSquares 0;
default leastSquaresS4f 0;
}

divSchemes
Expand Down Expand Up @@ -46,6 +46,6 @@ interpolationSchemes
interpolate(impK) linear;
interpolate(grad(D)) linear;
interpolate(grad(DD)) linear;
interpolate(sigma0) linear;
interpolate(sigma) linear;
}

16 changes: 16 additions & 0 deletions tools/tests/component-templates/solids4foam.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
build:
context: {{ dockerfile_context }}
args:
{% for key, value in build_arguments.items() %}
- {{key}}={{value}}
{% endfor %}
target: solids4foam
depends_on:
prepare:
condition: service_completed_successfully
volumes:
- {{ run_directory }}:/runs
command: >
/bin/bash -c "id &&
cd '/runs/{{ tutorial_folder }}/{{ case_folder }}' &&
openfoam {{ run }} | tee system-tests_{{ case_folder }}.log 2>&1"
16 changes: 16 additions & 0 deletions tools/tests/components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,22 @@ dune-adapter:
repository: https://github.com/precice/dune-adapter
default: "main"


solids4foam:
repository: https://github.com/solids4foam/solids4foam
template: component-templates/solids4foam.yaml
build_arguments:
PLATFORM:
description: Dockerfile platform used
default: "ubuntu_2404"
# The name "PLATFORM" is misleading: For this component, we use a different base image.
TUTORIALS_REF:
description: Tutorial git reference to use
default: "master"
OPENFOAM_ADAPTER_REF:
description: Reference/tag of the OpenFOAM adapter to use
default: "master"

fenics-adapter:
template: component-templates/fenics-adapter.yaml
build_arguments:
Expand Down
61 changes: 60 additions & 1 deletion tools/tests/dockerfiles/ubuntu_2404/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -560,4 +560,63 @@ RUN cd /home/precice/aste && \
make all install -j $(nproc) && \
cd ../.. && rm -rf aste

WORKDIR /home/precice
WORKDIR /home/precice


FROM solids4foam/solids4foam:v2.3-openfoam-v2412-latest as solids4foam

ARG PRECICE_UID=1000
ARG PRECICE_GID=1000
ARG OPENFOAM_ADAPTER_PR
ARG OPENFOAM_ADAPTER_REF

USER root
SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND=noninteractive

# Set the same user as the rest of the system tests components, for consistency.
RUN set -eux; \
if getent group "${PRECICE_GID}" >/dev/null; then \
existing_group="$(getent group "${PRECICE_GID}" | cut -d: -f1)"; \
if [ "${existing_group}" != "precice" ]; then \
groupmod -n precice "${existing_group}"; \
fi; \
else \
groupadd -g "${PRECICE_GID}" precice; \
fi; \
if getent passwd "${PRECICE_UID}" >/dev/null; then \
existing_user="$(getent passwd "${PRECICE_UID}" | cut -d: -f1)"; \
if [ "${existing_user}" != "precice" ]; then \
usermod -l precice -d /home/precice -m "${existing_user}"; \
fi; \
usermod -g "${PRECICE_GID}" precice; \
else \
useradd -u "${PRECICE_UID}" -g "${PRECICE_GID}" -ms /bin/bash precice; \
fi; \
mkdir -p /home/precice; \
chown -R "${PRECICE_UID}:${PRECICE_GID}" /home/precice

# The base image provides all binaries under /root/, but we prefer to build as a regular user.
RUN mv /root/OpenFOAM/ /home/precice/OpenFOAM/ && \
chown -R "${PRECICE_UID}:${PRECICE_GID}" /home/precice/OpenFOAM

# Set a general openfoam executable, to make the component template version-independent
RUN ln -sf /usr/bin/openfoam2412 /usr/bin/openfoam

RUN apt-get -qq update && \
apt-get -qq -y install wget git

# preCICE v3.4 was the last release to support Ubuntu 22.04 (used as a base image),
# so there is no reason to accept the preCICE version as an argument and build it from source.
# Rework this part once a newer base image is used.
RUN wget https://github.com/precice/precice/releases/download/v3.4.1/libprecice3_3.4.1_jammy.deb && \
apt-get -qq -y install ./libprecice3_3.4.1_jammy.deb

USER precice
WORKDIR /home/precice

RUN git clone https://github.com/precice/openfoam-adapter.git &&\
cd openfoam-adapter && \
if [ -n "${OPENFOAM_ADAPTER_PR}" ]; then git fetch origin pull/${OPENFOAM_ADAPTER_PR}/head; fi && \
git checkout ${OPENFOAM_ADAPTER_REF} && \
/usr/bin/openfoam2412 ./Allwmake -j $(nproc)
11 changes: 11 additions & 0 deletions tools/tests/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,13 @@ test_suites:
- solid-openfoam
max_time: 0.03
reference_result: ./perpendicular-flap/reference-results/fluid-openfoam_solid-openfoam.tar.gz
- &perpendicular-flap_fluid-openfoam_solid-solids4foam
path: perpendicular-flap
case_combination:
- fluid-openfoam
- solid-solids4foam
max_time: 0.1
reference_result: ./perpendicular-flap/reference-results/fluid-openfoam_solid-solids4foam.tar.gz
- &perpendicular-flap_fluid-su2_solid-fenics
path: perpendicular-flap
case_combination:
Expand Down Expand Up @@ -882,6 +889,10 @@ test_suites:
- *partitioned-heat-conduction-mixedbc_left-openfoam_right-openfoam
- *partitioned-heat-conduction-robin_left-openfoam_right-openfoam

solids4foam:
tutorials:
- *perpendicular-flap_fluid-openfoam_solid-solids4foam

su2-adapter:
tutorials:
- *flow-over-heated-plate_fluid-su2_solid-openfoam
Expand Down