diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Allrun b/elastic-tube-3d/OpenFOAM-CalculiX/Allrun deleted file mode 100755 index 35e748362..000000000 --- a/elastic-tube-3d/OpenFOAM-CalculiX/Allrun +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/bash -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions - -# This script prepares and runs all the participants in one terminal, -# forwarding the solvers' output to log files. - -# The script "Allclean" cleans-up the result and log files. -# Set up the run parameters: -#./Allclean - -# 1 for true, 0 for false -parallel=0 -if [ "$1" = "-parallel" ]; then - parallel=1 -fi - -# =============== Participant 1: Fluid =========================== -Participant1="Fluid" -Solver1="pimpleDyMFoam" - - # Prepare - echo "Preparing the ${Participant1} participant..." - - cd $Participant1 - echo " Restoring 0/ from 0.orig/..." - rm -rfv 0 - cp -r 0.orig 0 - Solver1=$(getApplication) # solver - echo " ${Participant1} Solver: ${Solver1}." - cd .. - - if [ $parallel -eq 1 ]; then - echo " Decomposing the case..." - decomposePar -force -case ${Participant1} > ${Participant1}_decomposePar.log 2>&1 - cd ${Participant1} - nproc=$(getNumberOfProcessors) - cd .. - echo " Starting the ${Participant1} participant in parallel..." - mpirun -np ${nproc} ${Solver1} -parallel -case ${Participant1} > ${Participant1}.log 2>&1 & - else - echo " Starting the ${Participant1} participant in serial..." - ${Solver1} -case ${Participant1} > ${Participant1}.log 2>&1 & - fi - PIDParticipant1=$! - -# =============== Participant 2: Solid =========================== -Participant2="Solid" -Solver2="ccx_preCICE" - - # Run and get the process id - echo "Starting the ${Participant2} participant..." - export OMP_NUM_THREADS=1 - export CCX_NPROC_EQUATION_SOLVER=1 - ${Solver2} -i ${Participant2}/tube -precice-participant Calculix > ${Participant2}.log 2>&1 & - PIDParticipant2=$! - -# Wait for all the participants to finish - # =============== Wait for all the participants to finish ======= -echo "Waiting for the participants to exit..., PIDs: ${PIDParticipant1}, ${PIDParticipant2}" -echo "(you may run 'tail -f ${Participant1}.log' in another terminal to check the progress)" -echo "To kill midrun, press 'c'. Ctrl+C will cause the processes to run in the background." -# loop="ps -p ${PIDParticipant1}" -while [ -e /proc/${PIDParticipant1} ]; do - # loop="ps -p ${PIDParticipant1}" - read -r -t1 -n1 input - if [ "$input" = "c" ]; then - kill ${PIDParticipant1} - kill ${PIDParticipant2} - false - fi -done - if [ $? -ne 0 ] || [ "$(grep -c -E "error:" ${Participant1}.log)" -ne 0 ] || [ "$(grep -c -E "error:" ${Participant2}.log)" -ne 0 ]; then - echo "" - echo "Something went wrong... See the log files for more." - # precaution - kill ${PIDParticipant1} - kill ${PIDParticipant2} -else - echo "" - echo "The simulation completed! Reconstructing fields (if parallel)" - ./removeObsoleteFolders.sh # For some versions of openfoam, the functionobject is written in an empty timeolder. remove these. - if [ $parallel -eq 1 ]; then - reconstructPar -case ${Participant1} > ${Participant1}/reconstructPar.log 2>&1 & - fi - echo "You may now open '${Participant1}/${Participant1}.foam' in ParaView." - # Note: ".foam" triggers the native OpenFOAM reader of ParaView. - # Change to ".OpenFOAM" to use the OpenFOAM reader provided with OpenFOAM. -fi - -echo "" -echo "### NOTE ### Make sure to use the correct solver for your OpenFOAM version! (pimpleFoam for OpenFOAM v1806, OpenFOAM 6, or newer, vs pimpleDyMFoam for older) You may change this in your Fluid/system/controlDict file, if needed." diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/README.md b/elastic-tube-3d/OpenFOAM-CalculiX/README.md deleted file mode 100644 index cd1f47792..000000000 --- a/elastic-tube-3d/OpenFOAM-CalculiX/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Tutorial for an FSI simulation of a three-dimensional expanding tube scenario - -This tutorial is described in the [preCICE wiki](https://github.com/precice/precice/wiki/Tutorial-for-FSI-with-OpenFOAM-and-CalculiX). - -It is known to work with OpenFOAM 4.1, 5.0, and CalculiX 2.15, but it should also work with newer versions. Have a look into our [Notes on OpenFOAM](https://github.com/precice/openfoam-adapter/wiki/Notes-on-OpenFOAM). - -The case files are prepared for the latest versions of OpenFOAM and use the solver `pimpleFoam`. **In case you are using a previous OpenFOAM version** you need to adjust the solver to `pimpleDyMFoam` in the `Fluid/system/controlDict` file. - -You may run the coupled simulation in serial using the script `Allrun` or in parallel with `Allrun -parallel` (`Allrun_parallel` is a shortcut to this). The output of each step will be redirected to log files. You can cleanup the simulation using `Allclean`. - -There is an [open issue](https://github.com/precice/openfoam-adapter/issues/26) that leads to additional "empty" result directories when running with some OpenFOAM versions, leading to inconveniences during post-processing. Please run the script `removeObsoleteSolvers.sh` to delete the additional files. - -You may adjust the end time in the precice-config_*.xml, or interupt the execution earlier if you want. - -This case was contributed by Kyle Davis (Universität Stuttgart). - -## Disclaimer - -This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM® and OpenCFD® trade marks. diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/precice-config.xml b/elastic-tube-3d/OpenFOAM-CalculiX/precice-config.xml deleted file mode 100644 index 0d32c859d..000000000 --- a/elastic-tube-3d/OpenFOAM-CalculiX/precice-config.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/elastic-tube-3d/README.md b/elastic-tube-3d/README.md index 3a040890f..196cd1496 100644 --- a/elastic-tube-3d/README.md +++ b/elastic-tube-3d/README.md @@ -1,8 +1,36 @@ --- title: Elastic tube 3D permalink: tutorials-elastic-tube-3d.html -keywords: -summary: +keywords: FSI, OpenFOAM, CalculiX, nearest-projection, IMVJ +summary: Tutorial for an FSI simulation of a three-dimensional expanding tube scenario --- {% include important.html content="We have not yet ported the documentation of the preCICE tutorials from the preCICE wiki to here. Please go to the [preCICE wiki](https://github.com/precice/precice/wiki#2-getting-started---tutorials)" %} + +## Setup + +The expanding tube test case involves a cylindrical fluid domain surrounded by a solid domain. A pressure inlet boundary condition is applied at the inlet for 3 milliseconds, and then 0 set to zero for a further 7 millisecond. The pressure of the fluid expands the tube which then relaxes once the pressure decreases. + +The expanding tube test case comes with the interface surface mesh connectivity of the solid domain. This allows the use of nearest-projection mapping of the displacements of the solid domain. In order to run the example with nearest projection mapping, the "node-mesh-with-connectivity" has been specified in the `solid-calculix/config.yml` file. More details can be found in the [CalculiX configuration description](adapter-calculix-config.html#nearest-projection-mapping). + +## Available solvers + +Fluid participant: + +* OpenFOAM. This tutorial is known to work with OpenFOAM 4.1, 5.0, but it should also work with newer versions. The case files are prepared for the latest versions of OpenFOAM and use the solver `pimpleFoam`. In case you are using a previous OpenFOAM version you need to adjust the solver to `pimpleDyMFoam` in the `Fluid/system/controlDict` file. For more information, have a look at the [OpenFOAM adapter documentation](adapter-openfoam-overview.html). + +Solid participant: + +* CalculiX. This tutorial is known to work with CalculiX 2.15, but it should also work with newer versions. For more information, have a look at the [CalculiX adapter documentation](adapter-calculix-overview.html). + +## Running the simulation + +You can start the simulation by running the script `./run.sh` located in each participant directory. OpenFOAM can be executed in parallel by using an additional `run.sh -parallel` flag. The default setting uses 4 MPI ranks. + +## Post-processing + +You can visualize the results using paraView or `cgx`(for native CalculiX resul files), as usual. The total deformation is rather small. Multiplying the deformation by factor of 10 (warp by vector filter in paraView) and visualizing the fluid domain at `t=0.005s` looks as follows: + +![result tube](images/tube_result.png) + +{% include disclaimer.html content="This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM® and OpenCFD® trade marks." %} diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Allclean b/elastic-tube-3d/clean.sh similarity index 50% rename from elastic-tube-3d/OpenFOAM-CalculiX/Allclean rename to elastic-tube-3d/clean.sh index 6c9cdb6c6..35ef50781 100755 --- a/elastic-tube-3d/OpenFOAM-CalculiX/Allclean +++ b/elastic-tube-3d/clean.sh @@ -7,23 +7,28 @@ echo "Cleaning..." . $WM_PROJECT_DIR/bin/tools/CleanFunctions # Participant 1: Fluid -Participant1="Fluid" +Participant1="fluid-openfoam" cd ${Participant1} # Clean the case - #cleanCase + # prevent cleaning the mesh + mv ./constant/polyMesh ./constant/mesh + cleanCase rm -rfv 0 + # restore mesh files + mv ./constant/mesh ./constant/polyMesh # Create an empty .foam file for ParaView # Note: ".foam" triggers the native OpenFOAM reader of ParaView. # Change to ".OpenFOAM" to use the OpenFOAM reader provided with OpenFOAM. touch ${Participant1}.foam + rm -fv ${Participant1}_decomposePar.log + rm -fv ${Participant1}.log + rm -fv ${Participant1}_reconstructPar.log + rm -fv precice-*.log + rm -fv precice-*-events.json cd .. -# Remove the log files -rm -fv ${Participant1}_decomposePar.log -rm -fv ${Participant1}.log -rm -fv ${Participant1}_reconstructPar.log # Participant 2: Solid -Participant2="Solid" +Participant2="solid-calculix" cd ${Participant2} # Clean the case rm -fv *.log @@ -31,28 +36,14 @@ cd ${Participant2} rm -fv tube.dat rm -fv tube.frd rm -fv tube.sta + rm -fv tube.12d + rm -fv spooles.out + rm -fv precice-*.log + rm -fv precice-*-events.json cd .. -# Remove the log files -rm -fv spooles.out -rm -fv ${Participant2}.log - -# Remove the preCICE-related log files -echo "Deleting the preCICE log files..." -rm -fv \ - precice-*.log \ - precice-postProcessingInfo.log \ - precice-*-events.json - -# Output files for preCICE versions before 1.2: -rm -fv \ - iterations-${Participant1}.txt iterations-${Participant2}.txt \ - convergence-${Participant1}.txt convergence-${Participant2}.txt \ - Events-${Participant1}.log Events-${Participant2}.log \ - EventTimings-${Participant1}.log EventTimings-${Participant2}.log # Remove the preCICE address files rm -rfv precice-run -rm -fv .*.address echo "Cleaning complete!" #------------------------------------------------------------------------------ diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/0.orig/U b/elastic-tube-3d/fluid-openfoam/0.orig/U similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/0.orig/U rename to elastic-tube-3d/fluid-openfoam/0.orig/U diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/0.orig/p b/elastic-tube-3d/fluid-openfoam/0.orig/p similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/0.orig/p rename to elastic-tube-3d/fluid-openfoam/0.orig/p diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/0.orig/pointDisplacement b/elastic-tube-3d/fluid-openfoam/0.orig/pointDisplacement similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/0.orig/pointDisplacement rename to elastic-tube-3d/fluid-openfoam/0.orig/pointDisplacement diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/RASProperties b/elastic-tube-3d/fluid-openfoam/constant/RASProperties old mode 100755 new mode 100644 similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/RASProperties rename to elastic-tube-3d/fluid-openfoam/constant/RASProperties diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/couplingProperties b/elastic-tube-3d/fluid-openfoam/constant/couplingProperties old mode 100755 new mode 100644 similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/couplingProperties rename to elastic-tube-3d/fluid-openfoam/constant/couplingProperties diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/dynamicMeshDict b/elastic-tube-3d/fluid-openfoam/constant/dynamicMeshDict old mode 100755 new mode 100644 similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/dynamicMeshDict rename to elastic-tube-3d/fluid-openfoam/constant/dynamicMeshDict diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/polyMesh/boundary b/elastic-tube-3d/fluid-openfoam/constant/polyMesh/boundary old mode 100755 new mode 100644 similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/polyMesh/boundary rename to elastic-tube-3d/fluid-openfoam/constant/polyMesh/boundary diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/polyMesh/cellZones b/elastic-tube-3d/fluid-openfoam/constant/polyMesh/cellZones old mode 100755 new mode 100644 similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/polyMesh/cellZones rename to elastic-tube-3d/fluid-openfoam/constant/polyMesh/cellZones diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/polyMesh/faceZones b/elastic-tube-3d/fluid-openfoam/constant/polyMesh/faceZones old mode 100755 new mode 100644 similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/polyMesh/faceZones rename to elastic-tube-3d/fluid-openfoam/constant/polyMesh/faceZones diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/polyMesh/faces b/elastic-tube-3d/fluid-openfoam/constant/polyMesh/faces old mode 100755 new mode 100644 similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/polyMesh/faces rename to elastic-tube-3d/fluid-openfoam/constant/polyMesh/faces diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/polyMesh/neighbour b/elastic-tube-3d/fluid-openfoam/constant/polyMesh/neighbour old mode 100755 new mode 100644 similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/polyMesh/neighbour rename to elastic-tube-3d/fluid-openfoam/constant/polyMesh/neighbour diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/polyMesh/owner b/elastic-tube-3d/fluid-openfoam/constant/polyMesh/owner old mode 100755 new mode 100644 similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/polyMesh/owner rename to elastic-tube-3d/fluid-openfoam/constant/polyMesh/owner diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/polyMesh/pointZones b/elastic-tube-3d/fluid-openfoam/constant/polyMesh/pointZones old mode 100755 new mode 100644 similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/polyMesh/pointZones rename to elastic-tube-3d/fluid-openfoam/constant/polyMesh/pointZones diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/polyMesh/points b/elastic-tube-3d/fluid-openfoam/constant/polyMesh/points old mode 100755 new mode 100644 similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/polyMesh/points rename to elastic-tube-3d/fluid-openfoam/constant/polyMesh/points diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/transportProperties b/elastic-tube-3d/fluid-openfoam/constant/transportProperties old mode 100755 new mode 100644 similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/transportProperties rename to elastic-tube-3d/fluid-openfoam/constant/transportProperties diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/turbulenceProperties b/elastic-tube-3d/fluid-openfoam/constant/turbulenceProperties old mode 100755 new mode 100644 similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/constant/turbulenceProperties rename to elastic-tube-3d/fluid-openfoam/constant/turbulenceProperties diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/Fluid.foam b/elastic-tube-3d/fluid-openfoam/fluid-openfoam.foam similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/Fluid.foam rename to elastic-tube-3d/fluid-openfoam/fluid-openfoam.foam diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/removeObsoleteFolders.sh b/elastic-tube-3d/fluid-openfoam/removeObsoleteFolders.sh similarity index 97% rename from elastic-tube-3d/OpenFOAM-CalculiX/removeObsoleteFolders.sh rename to elastic-tube-3d/fluid-openfoam/removeObsoleteFolders.sh index 80288fe27..167e40f61 100755 --- a/elastic-tube-3d/OpenFOAM-CalculiX/removeObsoleteFolders.sh +++ b/elastic-tube-3d/fluid-openfoam/removeObsoleteFolders.sh @@ -2,7 +2,6 @@ echo "Looking for any time directories without results (e.g. stray functionObjectProperties files, see issue #26 on GitHub)..." -cd Fluid for f in [0-9]* [0-9]*.[0-9]*; do if ! [ -f $f/U ] && ! [ -f $f/T ]; then rm -rfv $f diff --git a/elastic-tube-3d/fluid-openfoam/run.sh b/elastic-tube-3d/fluid-openfoam/run.sh new file mode 100755 index 000000000..7f89ca089 --- /dev/null +++ b/elastic-tube-3d/fluid-openfoam/run.sh @@ -0,0 +1,39 @@ +#!/bin/bash +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +# Fluid participant + +# Run this script in one terminal and the execute the coupled_elasto_dynamics bindary +# in another terminal. +# These scripts present how the two participants would be started manually. + +# Run this script with "-parallel" for parallel simulations + +# The script "Allclean" cleans-up the result and log files. + +# 1 for true, 0 for false +parallel=0 +if [ "$1" = "-parallel" ]; then + parallel=1 +fi + +echo "Preparing and running the Fluid participant..." + +rm -rfv 0/ +cp -r 0.orig/ 0/ +checkMesh + +# Run +solver=$(getApplication) +procs=$(getNumberOfProcessors) +if [ $parallel -eq 1 ]; then + decomposePar -force + mpirun -np $procs $solver -parallel + reconstructPar +else + $solver +fi + +# Workaround for issue #26 (OF-adapter, relevant for OF .com versions) +./removeObsoleteFolders.sh diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/system/controlDict b/elastic-tube-3d/fluid-openfoam/system/controlDict similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/system/controlDict rename to elastic-tube-3d/fluid-openfoam/system/controlDict diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/system/decomposeParDict b/elastic-tube-3d/fluid-openfoam/system/decomposeParDict similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/system/decomposeParDict rename to elastic-tube-3d/fluid-openfoam/system/decomposeParDict diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/system/fvSchemes b/elastic-tube-3d/fluid-openfoam/system/fvSchemes similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/system/fvSchemes rename to elastic-tube-3d/fluid-openfoam/system/fvSchemes diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/system/fvSolution b/elastic-tube-3d/fluid-openfoam/system/fvSolution similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/system/fvSolution rename to elastic-tube-3d/fluid-openfoam/system/fvSolution diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/system/preciceDict b/elastic-tube-3d/fluid-openfoam/system/preciceDict similarity index 89% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/system/preciceDict rename to elastic-tube-3d/fluid-openfoam/system/preciceDict index fcd534a79..152688f59 100644 --- a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/system/preciceDict +++ b/elastic-tube-3d/fluid-openfoam/system/preciceDict @@ -7,7 +7,7 @@ FoamFile object preciceDict; } -preciceConfig "precice-config.xml"; +preciceConfig "../precice-config.xml"; participant Fluid; @@ -23,7 +23,7 @@ interfaces readData ( - DisplacementDeltas0 + DisplacementDelta ); writeData @@ -43,7 +43,7 @@ interfaces writeData ( - Forces0 + Force ); }; }; @@ -51,4 +51,4 @@ interfaces FSI { rho rho [1 -3 0 0 0 0 0] 1000; -} \ No newline at end of file +} diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Fluid/time-series b/elastic-tube-3d/fluid-openfoam/time-series old mode 100755 new mode 100644 similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Fluid/time-series rename to elastic-tube-3d/fluid-openfoam/time-series diff --git a/elastic-tube-3d/images/tube_result.png b/elastic-tube-3d/images/tube_result.png new file mode 100644 index 000000000..ff8fb2c5e Binary files /dev/null and b/elastic-tube-3d/images/tube_result.png differ diff --git a/elastic-tube-3d/precice-config.xml b/elastic-tube-3d/precice-config.xml new file mode 100644 index 000000000..b57775c4d --- /dev/null +++ b/elastic-tube-3d/precice-config.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Solid/all.msh b/elastic-tube-3d/solid-calculix/all.msh old mode 100755 new mode 100644 similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Solid/all.msh rename to elastic-tube-3d/solid-calculix/all.msh diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/config.yml b/elastic-tube-3d/solid-calculix/config.yml similarity index 54% rename from elastic-tube-3d/OpenFOAM-CalculiX/config.yml rename to elastic-tube-3d/solid-calculix/config.yml index 597b03e44..43c524a66 100644 --- a/elastic-tube-3d/OpenFOAM-CalculiX/config.yml +++ b/elastic-tube-3d/solid-calculix/config.yml @@ -3,8 +3,8 @@ participants: interfaces: - nodes-mesh-with-connectivity: Calculix_Mesh patch: interface - read-data: [Forces0] - write-data: [DisplacementDeltas0] + read-data: [Force] + write-data: [DisplacementDelta] -precice-config-file: ./precice-config.xml +precice-config-file: ../precice-config.xml diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Solid/inlet.nam b/elastic-tube-3d/solid-calculix/inlet.nam old mode 100755 new mode 100644 similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Solid/inlet.nam rename to elastic-tube-3d/solid-calculix/inlet.nam diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Solid/interface.nam b/elastic-tube-3d/solid-calculix/interface.nam old mode 100755 new mode 100644 similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Solid/interface.nam rename to elastic-tube-3d/solid-calculix/interface.nam diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Solid/interface.sur b/elastic-tube-3d/solid-calculix/interface.sur similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Solid/interface.sur rename to elastic-tube-3d/solid-calculix/interface.sur diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Solid/outlet.nam b/elastic-tube-3d/solid-calculix/outlet.nam old mode 100755 new mode 100644 similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Solid/outlet.nam rename to elastic-tube-3d/solid-calculix/outlet.nam diff --git a/elastic-tube-3d/solid-calculix/run.sh b/elastic-tube-3d/solid-calculix/run.sh new file mode 100755 index 000000000..936f6bbe7 --- /dev/null +++ b/elastic-tube-3d/solid-calculix/run.sh @@ -0,0 +1,13 @@ +#!/bin/bash +cd ${0%/*} || exit 1 # Run from this directory + +# This script prepares and runs the CalculiX solver + +# =============== Participant: Solid =========================== +Solver="ccx_preCICE" + + # Run and get the process id + echo "Starting the CalculiX..." + export OMP_NUM_THREADS=1 + export CCX_NPROC_EQUATION_SOLVER=1 + ${Solver} -i tube -precice-participant Calculix diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Solid/tube.inp b/elastic-tube-3d/solid-calculix/tube.inp old mode 100755 new mode 100644 similarity index 62% rename from elastic-tube-3d/OpenFOAM-CalculiX/Solid/tube.inp rename to elastic-tube-3d/solid-calculix/tube.inp index 35d724817..69b1209a5 --- a/elastic-tube-3d/OpenFOAM-CalculiX/Solid/tube.inp +++ b/elastic-tube-3d/solid-calculix/tube.inp @@ -1,9 +1,9 @@ -*INCLUDE, INPUT=Solid/all.msh -*INCLUDE, INPUT=Solid/inlet.nam -*INCLUDE, INPUT=Solid/outlet.nam -*INCLUDE, INPUT=Solid/wall.nam -*INCLUDE, INPUT=Solid/interface.nam -*INCLUDE, INPUT=Solid/interface.sur +*INCLUDE, INPUT=all.msh +*INCLUDE, INPUT=inlet.nam +*INCLUDE, INPUT=outlet.nam +*INCLUDE, INPUT=wall.nam +*INCLUDE, INPUT=interface.nam +*INCLUDE, INPUT=interface.sur *MATERIAL, Name=EL *ELASTIC 300000.0, 0.3 diff --git a/elastic-tube-3d/OpenFOAM-CalculiX/Solid/wall.nam b/elastic-tube-3d/solid-calculix/wall.nam old mode 100755 new mode 100644 similarity index 100% rename from elastic-tube-3d/OpenFOAM-CalculiX/Solid/wall.nam rename to elastic-tube-3d/solid-calculix/wall.nam diff --git a/flow-over-heated-plate-steady-state/README.md b/flow-over-heated-plate-steady-state/README.md index e9c31078f..b0773360b 100644 --- a/flow-over-heated-plate-steady-state/README.md +++ b/flow-over-heated-plate-steady-state/README.md @@ -1,8 +1,41 @@ --- title: Flow over heated plate steady state permalink: tutorials-flow-over-heated-plate-steady-state.html -keywords: tutorial -summary: +keywords: CHT, steady-state, Code_Aster, OpenFOAM +summary: Using a steady-state OpenFOAM solver for a CHT coupling with Code_Aster. --- {% include important.html content="We have not yet ported the documentation of the preCICE tutorials from the preCICE wiki to here. Please go to the [preCICE wiki](https://github.com/precice/precice/wiki#2-getting-started---tutorials)" %} + +## Setup + +The setup for this tutorial is similar to the [flow over a heated plate](tutorials-flow-over-heated-plate.html) using OpenFOAM. In this tutorial OpenFOAM is used as the solver for the fluid domain, and Code-Aster is the solver for the solid domain. A difference here is that we are using a steady-state OpenFOAM solver for demonstration purposes, therefore the results between the two tutorials are not comparable. + + +## Available solvers + +Fluid participant: + +* OpenFOAM. We use buoyantSimpleFoam instead of the transient buoyantPimpleFoam. For more information, have a look at the [OpenFOAM adapter documentation](adapter-openfoam-overview.html). + +Solid participant: + +* Code_Aster. The [Code_Aster adapter documentation](adapter-code_aster.html) is oriented on this tutorial case. In particular the described configuration settings. + +## Running the Simulation + +Open two separate terminals and start each participant by calling the respective `run.sh` script. + +## Post-processing + +Firstly, enable the ParaViS view in Salome-Meca by selecting the icon in the top of the screen. + +For visualizing the results of the fluid solver, go to `File -> Open ParaView File` and select the `.foam` file. If you're asked to choose a reader, please select `OpenFOAMReader` and click `Apply` to visualize the result. + +For visualizing the result of the solid solver, press again `Open ParaView File` and select the `output-..rmed` group. Again, click `Apply` to visualize the result. After setting the temperature scale for both domains to 300-310 K, the following result is given for timestep 200: + +![post-processing](images/Post-processing.png) + +{% include disclaimer.html content="This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM® and OpenCFD® trade marks." %} + +{% include disclaimer.html content="This offering is not approved or endorsed by Électricité de France (EDF), producer and distributor of the Code_Aster software via www.code-aster.org, and owner of the Code_Aster trademark." %} diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Allrun b/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Allrun deleted file mode 100755 index e70d66f8e..000000000 --- a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Allrun +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/bash - -cd ${0%/*} || exit 1 # Run from this directory -. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions - -# This script prepares and runs all the participants in one terminal, -# forwarding the solvers' output to log files. -# Alternatively, you may execute the scripts "runSolid" and "runFluid" -# in separate terminals. - -# Run this script with "-parallel" for parallel simulations - -# The script "Allclean" cleans-up the result and log files. -# Set up the run parameters: - -# 1 for true, 0 for false -parallel=0 -if [ "$1" = "-parallel" ]; then - parallel=1 -fi - -# =============== Participant 1: Fluid =========================== -Participant1="Fluid" - - # Prepare - echo "Preparing the ${Participant1} participant..." - - cd $Participant1 - blockMesh > ${Participant1}_blockMesh.log 2>&1 - cd .. - - # Run and get the process id - if [ $parallel -eq 1 ]; then - echo " Decomposing the case..." - decomposePar -force -case ${Participant1} > ${Participant1}_decomposePar.log 2>&1 - cd ${Participant1} - nproc=$(getNumberOfProcessors) - cd .. - echo " Starting the ${Participant1} participant in parallel..." - mpirun -np ${nproc} buoyantSimpleFoam -parallel -case ${Participant1} > ${Participant1}.log 2>&1 & - else - echo " Starting the ${Participant1} participant in serial..." - buoyantSimpleFoam -case ${Participant1} > ${Participant1}.log 2>&1 & - fi - PIDParticipant1=$! - -# =============== Participant 2: Solid =========================== -Participant2="Solid" -export PRECICE_PARTICIPANT=${Participant2} -export TUTORIAL_ROOT=${PWD} - - # Run - echo " Starting the ${Participant2} participant..." - as_run --run ${Participant2}/solid.export > ${Participant2}.log 2>&1 & - PIDParticipant2=$! - - -# =============== Wait for all the participants to finish ======= -echo "Waiting for the participants to exit..., PIDs: ${PIDParticipant1}, ${PIDParticipant2}" -echo "(you may run 'tail -f ${Participant1}.log' in another terminal to check the progress)" - -echo "To interrupt the simulation, press 'c'. Ctrl+C will only send the processes to the background." -while [ -e /proc/${PIDParticipant1} ]; do - read -r -t1 -n1 input - if [ "$input" = "c" ]; then - kill ${PIDParticipant1} - kill ${PIDParticipant2} - false - fi -done - -if [ $? -ne 0 ] || [ "$(grep -c -E "error:" ${Participant1}.log)" -ne 0 ] || [ "$(grep -c -E "error:" ${Participant2}.log)" -ne 0 ]; then - echo "" - echo "Something went wrong... See the log files for more." - # Precaution - kill ${PIDParticipant1} - kill ${PIDParticipant2} -else - echo "" - echo "The simulation completed! (check for any errors)" - if [ $parallel -eq 1 ]; then - echo "Reconstructing fields..." - reconstructPar -case ${Participant1} > ${Participant1}_reconstructPar.log 2>&1 & - fi - - # Workaround for issue #26 - echo "Problems with time directories without results? Run the script removeObsoleteFolders.sh and see issue #26 on GitHub." - # ./removeObsoleteFolders.sh - - echo "You may now open '${Participant1}/${Participant1}.foam' in ParaView." - # Note: ".foam" triggers the native OpenFOAM reader of ParaView. - # Change to ".OpenFOAM" to use the OpenFOAM reader provided with OpenFOAM. -fi - -echo "" -echo "### NOTE ### Make sure to use the correct solver for your OpenFOAM version! (pimpleFoam for OpenFOAM v1806, OpenFOAM 6, or newer, vs pimpleDyMFoam for older) You may change this in your Fluid/system/controlDict file, if needed." diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Allrun_parallel b/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Allrun_parallel deleted file mode 100644 index b71529ac9..000000000 --- a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Allrun_parallel +++ /dev/null @@ -1 +0,0 @@ -./Allrun -parallel diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/README.md b/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/README.md deleted file mode 100644 index 18926ed3d..000000000 --- a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Tutorial for an CHT simulation of a flow over a heated plate using OpenFOAM and Code_Aster - -This tutorial is described in the [preCICE wiki](https://github.com/precice/code_aster-adapter/wiki/Flow-over-plate-Code_Aster-Tutorial). - -## Disclaimer - -This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM® and OpenCFD® trademarks. -This offering is not approved or endorsed by Électricité de France (EDF), producer and distributor of the Code_Aster software via www.code-aster.org, and owner of the Code_Aster trademark. diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/precice-config.xml b/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/precice-config.xml deleted file mode 100644 index 818aaa247..000000000 --- a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/precice-config.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/runFluid b/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/runFluid deleted file mode 100755 index 2335cb9c4..000000000 --- a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/runFluid +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - - cd Fluid; blockMesh; cd .. - buoyantSimpleFoam -case Fluid diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Allclean b/flow-over-heated-plate-steady-state/clean.sh similarity index 71% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Allclean rename to flow-over-heated-plate-steady-state/clean.sh index e5bb21cb8..ec73f4b23 100755 --- a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Allclean +++ b/flow-over-heated-plate-steady-state/clean.sh @@ -5,16 +5,20 @@ echo "Cleaning..." . $WM_PROJECT_DIR/bin/tools/CleanFunctions # Participant 1: Solid -Participant1="Solid" -rm -fv ${Participant1}/solid.mess -rm -fv ${Participant1}/solid.resu -rm -fv ${Participant1}/solid.rmed -rm -fv ${Participant1}.log -rm -fvr ${Participant1}/REPE_OUT -mkdir ${Participant1}/REPE_OUT +Participant1="solid-codeaster" +cd ${Participant1} + rm -fv ${Participant1}/solid.mess + rm -fv ${Participant1}/solid.resu + rm -fv ${Participant1}/solid.rmed + rm -fv ${Participant1}.log + rm -fvr ${Participant1}/REPE_OUT/* + rm -fv \ + precice-*.log \ + precice-*-events.json +cd .. # Participant 2: Fluid -Participant2="Fluid" +Participant2="fluid-openfoam" rm -fv ${Participant2}.log cd ${Participant2} cleanCase @@ -24,14 +28,12 @@ cd ${Participant2} rm -fv ${Participant2}_checkMesh.log rm -fv ${Participant2}_decomposePar.log rm -fv ${Participant2}_reconstructPar.log + rm -fv \ + precice-*.log \ + precice-*-events.json cd .. -# Remove the preCICE-related log files -echo "Deleting the preCICE log files..." -rm -fv \ - precice-*.log \ - precice-*-events.json # Output files for preCICE versions before 1.2: rm -fv \ diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/0/T b/flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/T similarity index 100% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/0/T rename to flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/T diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/0/U b/flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/U similarity index 100% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/0/U rename to flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/U diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/0/alphat b/flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/alphat similarity index 100% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/0/alphat rename to flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/alphat diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/0/epsilon b/flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/epsilon similarity index 100% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/0/epsilon rename to flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/epsilon diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/0/k b/flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/k similarity index 100% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/0/k rename to flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/k diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/0/nut b/flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/nut similarity index 100% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/0/nut rename to flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/nut diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/0/p b/flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/p similarity index 100% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/0/p rename to flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/p diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/0/p_rgh b/flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/p_rgh similarity index 100% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/0/p_rgh rename to flow-over-heated-plate-steady-state/fluid-openfoam/0.orig/p_rgh diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/constant/g b/flow-over-heated-plate-steady-state/fluid-openfoam/constant/g similarity index 100% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/constant/g rename to flow-over-heated-plate-steady-state/fluid-openfoam/constant/g diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/constant/thermophysicalProperties b/flow-over-heated-plate-steady-state/fluid-openfoam/constant/thermophysicalProperties similarity index 100% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/constant/thermophysicalProperties rename to flow-over-heated-plate-steady-state/fluid-openfoam/constant/thermophysicalProperties diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/constant/turbulenceProperties b/flow-over-heated-plate-steady-state/fluid-openfoam/constant/turbulenceProperties similarity index 100% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/constant/turbulenceProperties rename to flow-over-heated-plate-steady-state/fluid-openfoam/constant/turbulenceProperties diff --git a/flow-over-heated-plate-steady-state/fluid-openfoam/run.sh b/flow-over-heated-plate-steady-state/fluid-openfoam/run.sh new file mode 100755 index 000000000..1638cd9df --- /dev/null +++ b/flow-over-heated-plate-steady-state/fluid-openfoam/run.sh @@ -0,0 +1,40 @@ +#!/bin/bash +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +# Fluid participant + +# Run this script in one terminal and the execute the coupled_elasto_dynamics bindary +# in another terminal. +# These scripts present how the two participants would be started manually. + +# Run this script with "-parallel" for parallel simulations + +# The script "Allclean" cleans-up the result and log files. + +# 1 for true, 0 for false +parallel=0 +if [ "$1" = "-parallel" ]; then + parallel=1 +fi + +echo "Preparing and running the Fluid participant..." + +rm -rfv 0/ +cp -r 0.orig/ 0/ +blockMesh +checkMesh + +# Run +solver=$(getApplication) +procs=$(getNumberOfProcessors) +if [ $parallel -eq 1 ]; then + decomposePar -force + mpirun -np $procs $solver -parallel + reconstructPar +else + $solver +fi + +# Workaround for issue #26 (OF-adapter, relevant for OF .com versions) +./removeObsoleteFolders.sh diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/system/blockMeshDict b/flow-over-heated-plate-steady-state/fluid-openfoam/system/blockMeshDict similarity index 100% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/system/blockMeshDict rename to flow-over-heated-plate-steady-state/fluid-openfoam/system/blockMeshDict diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/system/controlDict b/flow-over-heated-plate-steady-state/fluid-openfoam/system/controlDict similarity index 100% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/system/controlDict rename to flow-over-heated-plate-steady-state/fluid-openfoam/system/controlDict diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/system/fvSchemes b/flow-over-heated-plate-steady-state/fluid-openfoam/system/fvSchemes similarity index 100% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/system/fvSchemes rename to flow-over-heated-plate-steady-state/fluid-openfoam/system/fvSchemes diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/system/fvSolution b/flow-over-heated-plate-steady-state/fluid-openfoam/system/fvSolution similarity index 100% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/system/fvSolution rename to flow-over-heated-plate-steady-state/fluid-openfoam/system/fvSolution diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/system/preciceDict b/flow-over-heated-plate-steady-state/fluid-openfoam/system/preciceDict similarity index 92% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/system/preciceDict rename to flow-over-heated-plate-steady-state/fluid-openfoam/system/preciceDict index d8a4e3a60..932e42bdd 100644 --- a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/system/preciceDict +++ b/flow-over-heated-plate-steady-state/fluid-openfoam/system/preciceDict @@ -7,7 +7,7 @@ FoamFile object preciceDict; } -preciceConfig "precice-config.xml"; +preciceConfig "../precice-config.xml"; participant Fluid; @@ -32,4 +32,4 @@ interfaces Heat-Transfer-Coefficient-Fluid ); }; -}; \ No newline at end of file +}; diff --git a/flow-over-heated-plate-steady-state/precice-config.xml b/flow-over-heated-plate-steady-state/precice-config.xml new file mode 100644 index 000000000..bb9d7ab4d --- /dev/null +++ b/flow-over-heated-plate-steady-state/precice-config.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/config.comm b/flow-over-heated-plate-steady-state/solid-codeaster/config.comm similarity index 92% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/config.comm rename to flow-over-heated-plate-steady-state/solid-codeaster/config.comm index edfb02397..1325aa753 100644 --- a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/config.comm +++ b/flow-over-heated-plate-steady-state/solid-codeaster/config.comm @@ -1,7 +1,7 @@ settings = \ {'base-path': tutorial_root, 'couplings': [['Solid-Interface', 'Fluid-Interface']], - 'participants': {'Solid': {'directory': 'Solid', + 'participants': {'Solid': {'directory': '.', 'domain-decomposed': False, 'interfaces': [{'material-id': 0, 'name': 'Solid-Interface', @@ -14,7 +14,7 @@ settings = \ 'write-mesh': 'Solid-Interface-Nodes'}], 'non-linear': False, 'solver': 'Code_Aster'}}, - 'precice-config-file': 'precice-config.xml', + 'precice-config-file': '../precice-config.xml', 'simulation': {'force-explicit': False, 'force-parallel': False, 'max-coupling-iterations': 100, diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Solid/def.comm b/flow-over-heated-plate-steady-state/solid-codeaster/def.comm similarity index 100% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Solid/def.comm rename to flow-over-heated-plate-steady-state/solid-codeaster/def.comm diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/runSolid b/flow-over-heated-plate-steady-state/solid-codeaster/run.sh similarity index 69% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/runSolid rename to flow-over-heated-plate-steady-state/solid-codeaster/run.sh index 795f56a0b..9cf027fc9 100755 --- a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/runSolid +++ b/flow-over-heated-plate-steady-state/solid-codeaster/run.sh @@ -1,4 +1,4 @@ #!/bin/bash export TUTORIAL_ROOT=${PWD} export PRECICE_PARTICIPANT=Solid - as_run --run Solid/solid.export + as_run --run solid.export diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Solid/solid.astk b/flow-over-heated-plate-steady-state/solid-codeaster/solid.astk similarity index 100% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Solid/solid.astk rename to flow-over-heated-plate-steady-state/solid-codeaster/solid.astk diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Solid/solid.mmed b/flow-over-heated-plate-steady-state/solid-codeaster/solid.mmed similarity index 100% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Solid/solid.mmed rename to flow-over-heated-plate-steady-state/solid-codeaster/solid.mmed diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Download_meshes b/heat-exchanger/Download_meshes similarity index 74% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Download_meshes rename to heat-exchanger/Download_meshes index 9165b3d87..2afc31177 100755 --- a/heat-exchanger/buoyantSimpleFoam-CalculiX/Download_meshes +++ b/heat-exchanger/Download_meshes @@ -8,11 +8,14 @@ echo "" echo "Downloading the Solid case..." wget -nv -O - https://syncandshare.lrz.de/dl/fi3c9Xt5UzBc5hJvXzsLBHXn/Solid.tar.gz | tar -xzv +mv ./Solid/* solid-calculix +rm -r ./Solid +sed -i 's/Solid/\./g' solid-calculix/solid.inp echo "Downloading and extracting the Inner-Fluid mesh..." -wget -nv -O - https://syncandshare.lrz.de/dl/fiNsYGC1DKzgio4jS5NhsXg7/polyMesh.org.tar.gz | tar -xzv -C Inner-Fluid/constant +wget -nv -O - https://syncandshare.lrz.de/dl/fiNsYGC1DKzgio4jS5NhsXg7/polyMesh.org.tar.gz | tar -xzv -C fluid-inner-openfoam/constant echo "Downloading and extracting the Outer-Fluid mesh..." -wget -nv -O - https://syncandshare.lrz.de/dl/fiEZRQ8rcVWRkoyZvANim1R1/polyMesh.org.tar.gz | tar -xzv -C Outer-Fluid/constant +wget -nv -O - https://syncandshare.lrz.de/dl/fiEZRQ8rcVWRkoyZvANim1R1/polyMesh.org.tar.gz | tar -xzv -C fluid-outer-openfoam/constant echo "Completed." diff --git a/heat-exchanger/README.md b/heat-exchanger/README.md index 8c7b8c18d..429ef958d 100644 --- a/heat-exchanger/README.md +++ b/heat-exchanger/README.md @@ -1,7 +1,49 @@ --- title: Heat exchanger permalink: tutorials-heat-exchanger.html -keywords: -summary: +keywords: CHT, OpenFOAM, CalculiX +summary: Tutorial for a shell-and-tube heat exchanger, using OpenFOAM and CalculiX --- + {% include important.html content="We have not yet ported the documentation of the preCICE tutorials from the preCICE wiki to here. Please go to the [preCICE wiki](https://github.com/precice/precice/wiki#2-getting-started---tutorials)" %} + +This tutorial describes how to run a conjugate heat transfer simulation with two separate OpenFOAM solvers and CalculiX. The files for this tutorial are located in this repository (directory CHT/heat_exchanger). + +This tutorial is based on [a case](https://www.simscale.com/projects/cheunglucia/heat_exchanger_-_cht_simulation/) prepared with [SimScale](https://www.simscale.com/) by [Lucia Cheung Yau](https://github.com/ludcila) for her [Master's Thesis](https://www5.in.tum.de/pub/Cheung2016_Thesis.pdf). It works with OpenFOAM 5.0 and CalculiX 2.12, but newer minor versions should work as well. + +{% include note.html content="Since the already prepared case contains mesh files of approx. 50MB in size, we host these files outside of the repository and you can download and extract them automatically in the appropriate locations by running the Download_meshes script. We plan to integrate the preparation part in this tutorial in the future." %} + + +## Setup + +This scenario consists of two fluid and one solid participant and represents a [shell-and-tube heat exchanger](https://en.wikipedia.org/wiki/Shell_and_tube_heat_exchanger). The geometry includes an (adiabatic) shell, in which an _inner fluid_ flows. It enters from the top-right inlet and exits from the bottom-left, after getting redirected several times by baffles. The geometry also includes a set of tubes, in which an _outer fluid_ flows from left to right. The two fluids enter in different temperatures and exchange heat through the (thick) solid walls of the tubes. This is a steady-state simulation and the flow is considered laminar. + +![Shell-and-tube heat exchanger geometry](images/heat_exchanger_geometry.png) + +We define the participants `Inner-Fluid`, `Solid`, and `Outer-Fluid` and two interfaces: one between the `Inner-Fluid` and `Solid` and one between the `Solid` and `Outer-Fluid`. Parallel-explicit coupling is used on both interfaces as pseudo timestepping to reach steady-state. We use nearest-neighbor mapping between all meshes. The OpenFOAM participants can either be executed in serial, or in parallel. + +![Heat exchanger: three participants](images/heat-exchanger_participants.png) + +## Available solvers + +* OpenFOAM. `buoyantSimpleFoam` is used for fluid flow (both participants). This is a solver for steady-state, buoyant, turbulent flow of compressible fluids for ventilation and heat transfer. For more information, have a look at the [OpenFOAM adapter documentation](adapter-openfoam-overview.html). + +* CalculiX. For more information, have a look at the [CalculiX adapter documentation](adapter-calculix-overview.html). + +## Running the Simulation + +Before starting the simulation for the first time you need to download the mesh files and copy them into the appropriate location. The shell script `./Download_meshes` will handle these things automatically. Afterwards, the simulation setup is ready to run. + +In order to run the coupled simulation, you can simply step into the participant directories and execute`./run.sh` for run (or `./run.sh -parallel`) for a parallel run. The simulation will need approximately one hour on a modern laptop to end (t=500). Before repeating the simulation, you can use the `clean.sh` script to clean-up any previous results and log files. + +## Post-processing + +After the first results are written (a new time directory will be created), you may visualize the results. + +For the OpenFOAM results, you can use ParaView and open the allready-provided `fluid-inner-openfoam.foam` and `fluid-outer-openfoam.foam` files. If it is installed you may better use `paraFoam -case fluid-inner-openfoam` and load the fluid-outer-openfoam.foam through the ParaView menu. You can then group the two cases and visualize them together. + +Unfortunately, ParaView does not support CalculiX result files. You may see the results in CGX or convert them using 3rd-party tools. + +![The heat exchanger with streamlines](images/heat-exchanger_visualization.png) + +{% include disclaimer.html content="This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM® and OpenCFD® trade marks." %} diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Allclean b/heat-exchanger/buoyantSimpleFoam-CalculiX/Allclean deleted file mode 100755 index c2a67413b..000000000 --- a/heat-exchanger/buoyantSimpleFoam-CalculiX/Allclean +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -echo "Cleaning..." - -# Source tutorial clean functions -. $WM_PROJECT_DIR/bin/tools/CleanFunctions - -# Participant 1: Inner-Fluid -Participant1="Inner-Fluid" -cd ${Participant1} - # Clean the case - cleanCase - # Create an empty .foam file for ParaView - # Note: ".foam" triggers the native OpenFOAM reader of ParaView. - # Change to ".OpenFOAM" to use the OpenFOAM reader provided with OpenFOAM. - touch ${Participant1}.foam -cd .. -# Remove the log files -rm -fv ${Participant1}_blockMesh.log -rm -fv ${Participant1}_checkMesh.log -rm -fv ${Participant1}_decomposePar.log -rm -fv ${Participant1}.log -rm -fv ${Participant1}_reconstructPar.log - -# Participant 2: Outer-Fluid -Participant2="Outer-Fluid" -cd ${Participant2} - # Clean the case - cleanCase - # Create an empty .foam file for ParaView - # Note: ".foam" triggers the native OpenFOAM reader of ParaView. - # Change to ".OpenFOAM" to use the OpenFOAM reader provided with OpenFOAM. - touch ${Participant2}.foam -cd .. -# Remove the log files -rm -fv ${Participant2}_blockMesh.log -rm -fv ${Participant2}_checkMesh.log -rm -fv ${Participant2}_decomposePar.log -rm -fv ${Participant2}.log -rm -fv ${Participant2}_reconstructPar.log - -# Participant 3: Solid -Participant3="Solid" -cd ${Participant3} - # Delete result and log files - rm -fv solid.cvg solid.dat solid.frd solid.sta -cd .. -rm -fv Solid.log - -# Remove the preCICE-related log files -echo "Deleting the preCICE log files..." -rm -fv \ - precice-*.log \ - precice-postProcessingInfo.log \ - precice-*-events.json - -# Output files for preCICE versions before 1.2: -rm -fv \ - iterations-${Participant1}.txt iterations-${Participant2}.txt iterations-${Participant3}.txt \ - convergence-${Participant1}.txt convergence-${Participant2}.txt convergence-${Participant3}.txt \ - Events-${Participant1}.log Events-${Participant2}.log Events-${Participant3}.log \ - EventTimings-${Participant1}.log EventTimings-${Participant2}.log EventTimings-${Participant3}.log - -# Remove the preCICE address files -rm -rfv precice-run -rm -fv .*.address - -echo "Cleaning complete!" -#------------------------------------------------------------------------------ diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Allrun b/heat-exchanger/buoyantSimpleFoam-CalculiX/Allrun deleted file mode 100755 index ffa213537..000000000 --- a/heat-exchanger/buoyantSimpleFoam-CalculiX/Allrun +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/bash -cd ${0%/*} || exit 1 # Run from this directory - -# This script prepares and runs all the participants in one terminal, -# forwarding the solvers' output to log files. -# You need to first download the mesh files separately using the Download_meshes script. -# The script "Allclean" cleans-up the result and log files. - -if [ ! -f Solid/all.msh ]; then - echo "Mesh files not found. Use the Download_meshes script to download them." - exit -fi - -# Participant 1: Inner-Fluid -Participant1="Inner-Fluid" -Solver1="buoyantSimpleFoam" - - # Prepare - echo "Preparing the ${Participant1} participant..." - # Copy the backup of the mesh - cp -r ${Participant1}/constant/polyMesh.org ${Participant1}/constant/polyMesh - - # Run and get the process id - echo "Starting the ${Participant1} participant..." - ${Solver1} -case ${Participant1} > ${Participant1}.log 2>&1 & - PIDParticipant1=$! - -# Participant 2: outer-fluid -Participant2="Outer-Fluid" -Solver2="buoyantSimpleFoam" - - # Prepare - echo "Preparing the ${Participant2} participant..." - # Copy the backup of the mesh - cp -r ${Participant2}/constant/polyMesh.org ${Participant2}/constant/polyMesh - - # Run and get the process id - echo "Starting the ${Participant2} participant..." - ${Solver2} -case ${Participant2} > ${Participant2}.log 2>&1 & - PIDParticipant2=$! - -# Participant 3: Solid -Participant3="Solid" -Solver3="ccx_preCICE" - - # Run and get the process id - echo "Starting the ${Participant3} participant..." - export OMP_NUM_THREADS=1 - export CCX_NPROC_EQUATION_SOLVER=1 - ${Solver3} -i ${Participant3}/solid -precice-participant ${Participant3} > ${Participant3}.log 2>&1 & - PIDParticipant3=$! - -# Wait for all the participants to finish -echo "Waiting for the participants to exit..." -echo "(you may run 'tail -f ${Participant1}.log' in another terminal to check the progress)" -wait ${PIDParticipant1} -wait ${PIDParticipant2} -wait ${PIDParticipant3} -if [ $? -ne 0 ] || [ "$(grep -c -E "error:" ${Participant1}.log)" -ne 0 ] || [ "$(grep -c -E "error:" ${Participant2}.log)" -ne 0 ] || [ "$(grep -c -E "*ERROR" ${Participant3}.log)" -ne 0 ]; then - echo "" - echo "Something went wrong... See the log files for more." -else - echo "" - echo "The simulation completed!" - echo "You may now open '${Participant1}/${Participant1}.foam' and '${Participant2}/${Participant2}.foam' in ParaView." - # Note: ".foam" triggers the native OpenFOAM reader of ParaView. - # Change to ".OpenFOAM" to use the OpenFOAM reader provided with OpenFOAM. -fi diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Allrun_parallel b/heat-exchanger/buoyantSimpleFoam-CalculiX/Allrun_parallel deleted file mode 100755 index 42aaa6a6b..000000000 --- a/heat-exchanger/buoyantSimpleFoam-CalculiX/Allrun_parallel +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash -cd ${0%/*} || exit 1 # Run from this directory - -# This script prepares and runs all the participants in one terminal, in parallel, -# forwarding the solvers' output to log files. -# You need to first download the mesh files separately using the Download_meshes script. -# The script "Allclean" cleans-up the result and log files. - -if [ ! -f Solid/all.msh ]; then - echo "Mesh files not found. Use the Download_meshes script to download them." - exit -fi - -# Participant 1: inner-fluid -Participant1="Inner-Fluid" -Solver1="buoyantSimpleFoam" - - # Prepare - echo "Preparing the ${Participant1} participant..." - # Copy the backup of the mesh - cp -r ${Participant1}/constant/polyMesh.org ${Participant1}/constant/polyMesh - - # Decompose the domain - decomposePar -case ${Participant1} > ${Participant1}_decomposePar.log 2>&1 - - # Run and get the process id - echo "Starting the ${Participant1} participant..." - mpirun -np 2 ${Solver1} -parallel -case ${Participant1} > ${Participant1}.log 2>&1 & - PIDParticipant1=$! - -# Participant 2: outer-fluid -Participant2="Outer-Fluid" -Solver2="buoyantSimpleFoam" - - # Prepare - echo "Preparing the ${Participant2} participant..." - # Copy the backup of the mesh - cp -r ${Participant2}/constant/polyMesh.org ${Participant2}/constant/polyMesh - - # Decompose the domain - decomposePar -case ${Participant2} > ${Participant2}_decomposePar.log 2>&1 - - # Run and get the process id - echo "Starting the ${Participant2} participant..." - mpirun -np 2 ${Solver2} -parallel -case ${Participant2} > ${Participant2}.log 2>&1 & - PIDParticipant2=$! - -# Participant 3: Solid -Participant3="Solid" -Solver3="ccx_preCICE" - - # Run and get the process id - echo "Starting the ${Participant3} participant..." - ${Solver3} -i ${Participant3}/solid -precice-participant ${Participant3} > ${Participant3}.log 2>&1 & - PIDParticipant3=$! - - -# Wait for all the participants to finish -echo "Waiting for the participants to exit..." -echo "(you may run 'tail -f ${Participant1}.log' in another terminal to check the progress)" -wait ${PIDParticipant1} -wait ${PIDParticipant2} -wait ${PIDParticipant3} -if [ $? -ne 0 ] || [ "$(grep -c -E "error:" ${Participant1}.log)" -ne 0 ] || [ "$(grep -c -E "error:" ${Participant2}.log)" -ne 0 ] || [ "$(grep -c -E "*ERROR" ${Participant3}.log)" -ne 0 ]; then - echo "" - echo "Something went wrong... See the log files for more." -else - echo "" - echo "The simulation completed!" - - # Reconstruct the cases - echo "Reconstructing case ${Participant1}..." - reconstructPar -case ${Participant1} > ${Participant1}_reconstructPar.log 2>&1 - echo "Reconstructing case ${Participant2}..." - reconstructPar -case ${Participant2} > ${Participant2}_reconstructPar.log 2>&1 - - echo "You may now open '${Participant1}/${Participant1}.foam' and '${Participant2}/${Participant2}.foam' in ParaView." - # Note: ".foam" triggers the native OpenFOAM reader of ParaView. - # Change to ".OpenFOAM" to use the OpenFOAM reader provided with OpenFOAM. -fi diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/README.md b/heat-exchanger/buoyantSimpleFoam-CalculiX/README.md deleted file mode 100644 index debd8fce2..000000000 --- a/heat-exchanger/buoyantSimpleFoam-CalculiX/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Tutorial for a shell-and-tube heat exchanger, using OpenFOAM and CalculiX. - -This tutorial is described in the [preCICE wiki](https://github.com/precice/precice/wiki/Tutorial-for-CHT-with-OpenFOAM-and-CalculiX). - -It works with OpenFOAM 5.0 and CalculiX 2.12, but newer minor versions should work as well. - -Please run the script `Download_meshes` first. -Then you may run the `Allrun` for a serial run, -or the `Allrun_parallel` for a parallel run. - -You may adjust the end time in the precice-config_*.xml, or interupt the execution earlier if you want. - -Based on a case prepared with simscale.com. - -## Disclaimer - -This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM® and OpenCFD® trade marks. diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/inner-fluid.OpenFOAM b/heat-exchanger/buoyantSimpleFoam-CalculiX/inner-fluid.OpenFOAM deleted file mode 100644 index e69de29bb..000000000 diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/precice-config.xml b/heat-exchanger/buoyantSimpleFoam-CalculiX/precice-config.xml deleted file mode 100644 index 48d1ab1ec..000000000 --- a/heat-exchanger/buoyantSimpleFoam-CalculiX/precice-config.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/heat-exchanger/clean.sh b/heat-exchanger/clean.sh new file mode 100755 index 000000000..83440aa72 --- /dev/null +++ b/heat-exchanger/clean.sh @@ -0,0 +1,67 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +echo "Cleaning..." + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +# Participant 1: Inner-Fluid +Participant1="fluid-inner-openfoam" +cd ${Participant1} + # Clean the case + cleanCase + # Create an empty .foam file for ParaView + # Note: ".foam" triggers the native OpenFOAM reader of ParaView. + # Change to ".OpenFOAM" to use the OpenFOAM reader provided with OpenFOAM. + touch ${Participant1}.foam + # Remove the log files + rm -fv ${Participant1}_blockMesh.log + rm -fv ${Participant1}_checkMesh.log + rm -fv ${Participant1}_decomposePar.log + rm -fv ${Participant1}.log + rm -fv ${Participant1}_reconstructPar.log + rm -fv \ + precice-*.log \ + precice-postProcessingInfo.log \ + precice-*-events.json +cd .. + +# Participant 2: Outer-Fluid +Participant2="fluid-outer-openfoam" +cd ${Participant2} + # Clean the case + cleanCase + # Create an empty .foam file for ParaView + # Note: ".foam" triggers the native OpenFOAM reader of ParaView. + # Change to ".OpenFOAM" to use the OpenFOAM reader provided with OpenFOAM. + touch ${Participant2}.foam + # Remove the log files + rm -fv ${Participant2}_blockMesh.log + rm -fv ${Participant2}_checkMesh.log + rm -fv ${Participant2}_decomposePar.log + rm -fv ${Participant2}.log + rm -fv ${Participant2}_reconstructPar.log + rm -fv \ + precice-*.log \ + precice-postProcessingInfo.log \ + precice-*-events.json +cd .. + +# Participant 3: Solid +Participant3="solid-calculix" +cd ${Participant3} + # Delete result and log files + rm -fv solid.cvg solid.dat solid.frd solid.sta + rm -fv \ + precice-*.log \ + precice-postProcessingInfo.log \ + precice-*-events.json +cd .. + +# Remove the preCICE address files +rm -rfv precice-run +rm -fv .*.address + +echo "Cleaning complete!" +#------------------------------------------------------------------------------ diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/0/T b/heat-exchanger/fluid-inner-openfoam/0.orig/T similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/0/T rename to heat-exchanger/fluid-inner-openfoam/0.orig/T diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/0/U b/heat-exchanger/fluid-inner-openfoam/0.orig/U similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/0/U rename to heat-exchanger/fluid-inner-openfoam/0.orig/U diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/0/alphat b/heat-exchanger/fluid-inner-openfoam/0.orig/alphat similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/0/alphat rename to heat-exchanger/fluid-inner-openfoam/0.orig/alphat diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/0/epsilon b/heat-exchanger/fluid-inner-openfoam/0.orig/epsilon similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/0/epsilon rename to heat-exchanger/fluid-inner-openfoam/0.orig/epsilon diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/0/k b/heat-exchanger/fluid-inner-openfoam/0.orig/k similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/0/k rename to heat-exchanger/fluid-inner-openfoam/0.orig/k diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/0/nut b/heat-exchanger/fluid-inner-openfoam/0.orig/nut similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/0/nut rename to heat-exchanger/fluid-inner-openfoam/0.orig/nut diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/0/p b/heat-exchanger/fluid-inner-openfoam/0.orig/p similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/0/p rename to heat-exchanger/fluid-inner-openfoam/0.orig/p diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/0/p_rgh b/heat-exchanger/fluid-inner-openfoam/0.orig/p_rgh similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/0/p_rgh rename to heat-exchanger/fluid-inner-openfoam/0.orig/p_rgh diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/constant/g b/heat-exchanger/fluid-inner-openfoam/constant/g similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/constant/g rename to heat-exchanger/fluid-inner-openfoam/constant/g diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/constant/radiationProperties b/heat-exchanger/fluid-inner-openfoam/constant/radiationProperties similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/constant/radiationProperties rename to heat-exchanger/fluid-inner-openfoam/constant/radiationProperties diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/constant/thermophysicalProperties b/heat-exchanger/fluid-inner-openfoam/constant/thermophysicalProperties similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/constant/thermophysicalProperties rename to heat-exchanger/fluid-inner-openfoam/constant/thermophysicalProperties diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/constant/turbulenceProperties b/heat-exchanger/fluid-inner-openfoam/constant/turbulenceProperties similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/constant/turbulenceProperties rename to heat-exchanger/fluid-inner-openfoam/constant/turbulenceProperties diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/system/controlDict b/heat-exchanger/fluid-inner-openfoam/system/controlDict similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/system/controlDict rename to heat-exchanger/fluid-inner-openfoam/system/controlDict diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/system/decomposeParDict b/heat-exchanger/fluid-inner-openfoam/system/decomposeParDict similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/system/decomposeParDict rename to heat-exchanger/fluid-inner-openfoam/system/decomposeParDict diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/system/fvOptions b/heat-exchanger/fluid-inner-openfoam/system/fvOptions similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/system/fvOptions rename to heat-exchanger/fluid-inner-openfoam/system/fvOptions diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/system/fvSchemes b/heat-exchanger/fluid-inner-openfoam/system/fvSchemes similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/system/fvSchemes rename to heat-exchanger/fluid-inner-openfoam/system/fvSchemes diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/system/fvSolution b/heat-exchanger/fluid-inner-openfoam/system/fvSolution similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/system/fvSolution rename to heat-exchanger/fluid-inner-openfoam/system/fvSolution diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/system/preciceDict b/heat-exchanger/fluid-inner-openfoam/system/preciceDict similarity index 92% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/system/preciceDict rename to heat-exchanger/fluid-inner-openfoam/system/preciceDict index 4004345f9..245512468 100644 --- a/heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/system/preciceDict +++ b/heat-exchanger/fluid-inner-openfoam/system/preciceDict @@ -7,7 +7,7 @@ FoamFile object preciceDict; } -preciceConfig "precice-config.xml"; +preciceConfig "../precice-config.xml"; participant Inner-Fluid; @@ -32,4 +32,4 @@ interfaces Heat-Transfer-Coefficient-Inner-Fluid ); }; -}; \ No newline at end of file +}; diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/0/T b/heat-exchanger/fluid-outer-openfoam/0.orig/T similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/0/T rename to heat-exchanger/fluid-outer-openfoam/0.orig/T diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/0/U b/heat-exchanger/fluid-outer-openfoam/0.orig/U similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/0/U rename to heat-exchanger/fluid-outer-openfoam/0.orig/U diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/0/alphat b/heat-exchanger/fluid-outer-openfoam/0.orig/alphat similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/0/alphat rename to heat-exchanger/fluid-outer-openfoam/0.orig/alphat diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/0/epsilon b/heat-exchanger/fluid-outer-openfoam/0.orig/epsilon similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/0/epsilon rename to heat-exchanger/fluid-outer-openfoam/0.orig/epsilon diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/0/k b/heat-exchanger/fluid-outer-openfoam/0.orig/k similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/0/k rename to heat-exchanger/fluid-outer-openfoam/0.orig/k diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/0/nut b/heat-exchanger/fluid-outer-openfoam/0.orig/nut similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/0/nut rename to heat-exchanger/fluid-outer-openfoam/0.orig/nut diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/0/p b/heat-exchanger/fluid-outer-openfoam/0.orig/p similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/0/p rename to heat-exchanger/fluid-outer-openfoam/0.orig/p diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/0/p_rgh b/heat-exchanger/fluid-outer-openfoam/0.orig/p_rgh similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/0/p_rgh rename to heat-exchanger/fluid-outer-openfoam/0.orig/p_rgh diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/constant/g b/heat-exchanger/fluid-outer-openfoam/constant/g similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/constant/g rename to heat-exchanger/fluid-outer-openfoam/constant/g diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/constant/radiationProperties b/heat-exchanger/fluid-outer-openfoam/constant/radiationProperties similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/constant/radiationProperties rename to heat-exchanger/fluid-outer-openfoam/constant/radiationProperties diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/constant/thermophysicalProperties b/heat-exchanger/fluid-outer-openfoam/constant/thermophysicalProperties similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/constant/thermophysicalProperties rename to heat-exchanger/fluid-outer-openfoam/constant/thermophysicalProperties diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/constant/turbulenceProperties b/heat-exchanger/fluid-outer-openfoam/constant/turbulenceProperties similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/constant/turbulenceProperties rename to heat-exchanger/fluid-outer-openfoam/constant/turbulenceProperties diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/system/controlDict b/heat-exchanger/fluid-outer-openfoam/system/controlDict similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/system/controlDict rename to heat-exchanger/fluid-outer-openfoam/system/controlDict diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/system/decomposeParDict b/heat-exchanger/fluid-outer-openfoam/system/decomposeParDict similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/system/decomposeParDict rename to heat-exchanger/fluid-outer-openfoam/system/decomposeParDict diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/system/fvOptions b/heat-exchanger/fluid-outer-openfoam/system/fvOptions similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/system/fvOptions rename to heat-exchanger/fluid-outer-openfoam/system/fvOptions diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/system/fvSchemes b/heat-exchanger/fluid-outer-openfoam/system/fvSchemes similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/system/fvSchemes rename to heat-exchanger/fluid-outer-openfoam/system/fvSchemes diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/system/fvSolution b/heat-exchanger/fluid-outer-openfoam/system/fvSolution similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/system/fvSolution rename to heat-exchanger/fluid-outer-openfoam/system/fvSolution diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/system/preciceDict b/heat-exchanger/fluid-outer-openfoam/system/preciceDict similarity index 92% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/system/preciceDict rename to heat-exchanger/fluid-outer-openfoam/system/preciceDict index 27d9a2dc7..2b1c35d85 100644 --- a/heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/system/preciceDict +++ b/heat-exchanger/fluid-outer-openfoam/system/preciceDict @@ -7,7 +7,7 @@ FoamFile object preciceDict; } -preciceConfig "precice-config.xml"; +preciceConfig "../precice-config.xml"; participant Outer-Fluid; @@ -32,4 +32,4 @@ interfaces Heat-Transfer-Coefficient-Outer-Fluid ); }; -}; \ No newline at end of file +}; diff --git a/heat-exchanger/images/heat-exchanger_participants.png b/heat-exchanger/images/heat-exchanger_participants.png new file mode 100644 index 000000000..06d89251d Binary files /dev/null and b/heat-exchanger/images/heat-exchanger_participants.png differ diff --git a/heat-exchanger/images/heat-exchanger_visualization.png b/heat-exchanger/images/heat-exchanger_visualization.png new file mode 100644 index 000000000..f67636d01 Binary files /dev/null and b/heat-exchanger/images/heat-exchanger_visualization.png differ diff --git a/heat-exchanger/images/heat_exchanger_geometry.png b/heat-exchanger/images/heat_exchanger_geometry.png new file mode 100644 index 000000000..31892f08e Binary files /dev/null and b/heat-exchanger/images/heat_exchanger_geometry.png differ diff --git a/heat-exchanger/precice-config.xml b/heat-exchanger/precice-config.xml new file mode 100644 index 000000000..e1259bdcf --- /dev/null +++ b/heat-exchanger/precice-config.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/config.yml b/heat-exchanger/solid-calculix/config.yml similarity index 93% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/config.yml rename to heat-exchanger/solid-calculix/config.yml index 4a6cc8215..8f4a3f7ca 100644 --- a/heat-exchanger/buoyantSimpleFoam-CalculiX/config.yml +++ b/heat-exchanger/solid-calculix/config.yml @@ -11,4 +11,4 @@ participants: patch: outer-interface read-data: [Sink-Temperature-Outer-Fluid, Heat-Transfer-Coefficient-Outer-Fluid] write-data: [Sink-Temperature-Solid, Heat-Transfer-Coefficient-Solid] -precice-config-file: precice-config.xml +precice-config-file: ../precice-config.xml diff --git a/heat-exchanger/solid-calculix/run.sh b/heat-exchanger/solid-calculix/run.sh new file mode 100755 index 000000000..ef3b4373c --- /dev/null +++ b/heat-exchanger/solid-calculix/run.sh @@ -0,0 +1,21 @@ +#!/bin/bash +cd ${0%/*} || exit 1 # Run from this directory + +# This script prepares and runs all the participants in one terminal, +# forwarding the solvers' output to log files. +# You need to first download the mesh files separately using the Download_meshes script. +# The script "Allclean" cleans-up the result and log files. + +if [ ! -f all.msh ]; then + echo "Mesh files not found. Use the Download_meshes script to download them." + exit +fi + +Participant="Solid" +Solver="ccx_preCICE" + +# Run and get the process id +echo "Starting the ${Participant} participant..." +export OMP_NUM_THREADS=1 +export CCX_NPROC_EQUATION_SOLVER=1 +${Solver} -i solid -precice-participant ${Participant} diff --git a/multiple-perpendicular-flaps/README.md b/multiple-perpendicular-flaps/README.md index fddc32541..e9826770b 100644 --- a/multiple-perpendicular-flaps/README.md +++ b/multiple-perpendicular-flaps/README.md @@ -1,8 +1,105 @@ --- title: Muliple perpendicular flaps permalink: tutorials-multiple-perpendicular-flaps.html -keywords: -summary: +keywords: multi-coupling, OpenFOAM, deal.II, FSI +summary: In this case, a fluid and two solids are coupled together using a fully-implicit multi-coupling scheme. --- +{% include important.html content="We have not yet ported the documentation of the preCICE tutorials from the preCICE wiki to here. Please go to the [preCICE wiki](https://github.com/precice/precice/wiki#2-getting-started---tutorials)" %} + +## Case Setup + +In the following tutorial we model a fluid flowing through a channel. Two solid, elastic flaps are fixed to the floor of this channel. The flaps oscillate due to the fluid pressure building up on its surface. In this case, a fluid and two solids are coupled together using a fully-implicit multi-coupling scheme. The case setup is shown here: + +![](images/setup_twoflaps.png) + +The simulated flow domain is 6 units long (x) and 4 units tall (z). The flaps are clamped at the bottom (z=0) and they are 1 unit tall (z), 0.1 units long (x), and 0.3 units wide (y). Being located at x=-1 and x=1, the flaps split the domain into three equal parts. + +This is a quasi-2D simulation, with one cell in width and empty conditions are imposed on the front and back. + +The inflow velocity is 5 m/s (uniform) on the left boundary. +At the outlet, pressure is set to zero and velocity to `zeroGradient`. +The top, bottom and flap are walls with a `noslip` condition. + +For a case showing fluid-structure interaction only (no multi-coupling), take a look at the [single perpendicular flap tutorial](tutorials-perpendicular-flap.html). + +## Why multi-coupling? + +This is a case with three participants: the fluid and each flap. In preCICE, there are two options to [couple more than two participants](configuration-coupling-multi.html). The first option a composition of bi-coupling schemes, in which we must specify the exchange of data in a participant to participant manner. However, such a composition is not suited for combining multiple strong fluid-structure interations [1]. Thus, in this case, we use the second option, fully-implicit multi-coupling. + +We can set this in our `precice-config.xml`: + +```xml + + + + +``` + +The participant that has the control is the one that it is connected to all other participants. This is why we have chosen the fluid participant for this task. + +## About the Solvers + +For the fluid participant we use OpenFOAM. In particular, we use the application `pimpleFoam`. The geometry of the Fluid participant is defined in the file `Fluid/system/blockMeshDict`. Besides, we must specify where are we exchanging data with the other participants. The interfaces are set in the file `Fluid/system/preciceDict`. In this file, we set to exchange stress and displacement on the surface of each flap. + +Most of the coupling details are specified in the file `precide-config.xml`. Here we estipulate the order in which we read/write data from one participant to another or how we map from the fluid to the solid's mesh. In particular, we have choosen the nearest-neighbor mapping scheme. + +For the simulation of the solid participants we use the deal.II adapter. In deal.II, the geometry of the domain is specified directly on the solver. The two flaps in our case are essentially the same but for the x-coordinate. The flap geometry is given to the solver when we select the scenario in the '.prm' file. + + ``` + set Scenario = PF + ``` +But to specify the position of the flap along the x-axis, we must specify it in the `Solid1/linear_elasticity.prm` file as follows: + + ``` + set Flap location = -1.0 + ``` +While in case of `Solid2/linear_elasticity.prm` we write: + + ``` + set Flap location = 1.0 + ``` +The scenario settings are implemented similarly for the nonlinear case. + +## Running the Simulation +1. Preparation: + To run the coupled simulation, copy the deal.II executable `linear_elasticity` or `nonlinear_elasticity` into the main folder. To learn how to obtain the deal.II executable take a look at the description on the [deal.II-adapter page](adapter-dealii-overview.html). +2. Starting: + + We are going to run each solver in a different terminal. It is important that first we navigate to the simulation directory so that all solvers start in the same directory. + To start the `Fluid` participant, run: + ``` + cd fluid-openfoam + ./run.sh + ``` + to start OpenFOAM in serial or + ``` + cd fluid-openfoam + ./run.sh -parallel + ``` + for a parallel run. + + The solid participants are only designed for serial runs. To run the `Solid1` participant, execute the corresponding deal.II binary file e.g. by: + ``` + cd solid-left-dealii + ./run.sh -linear + ``` + Finally, in the third terminal we will run the solver for the `Solid2` participant by: + ``` + cd solid-right-dealii + ./run.sh -linear + ``` + In case we want to run the nonlinear case, simply replace the flag`-linear` by `-nonlinear`. + +## Postprocessing + +After the simulation has finished, you can visualize your results using e.g. ParaView. Fluid results are in the OpenFOAM format and you may load the `Fluid.foam` file. Looking at the fluid results is enough to obtain information about the behaviour of the flaps. You can also visualize the solid participants' vtks though. + +![](images/results.png) + +## References + +[1] H. Bungartz, F. Linder, M. Mehl, B. Uekerman. A plug-and-play coupling approach for parallel multi-field simulations. 2014. + + {% include important.html content="We have not yet ported the documentation of the preCICE tutorials from the preCICE wiki to here. Please go to the [preCICE wiki](https://github.com/precice/precice/wiki#2-getting-started---tutorials)" %} diff --git a/multiple-perpendicular-flaps/clean.sh b/multiple-perpendicular-flaps/clean.sh new file mode 100755 index 000000000..8f991d8d8 --- /dev/null +++ b/multiple-perpendicular-flaps/clean.sh @@ -0,0 +1,67 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +echo "Cleaning..." + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +# Participant 1: Fluid (OpenFOAM) +Participant1="fluid-openfoam" +cd ${Participant1} + # Clean the case + cleanCase + rm -rfv 0 + # Create an empty .foam file for ParaView + # Note: ".foam" triggers the native OpenFOAM reader of ParaView. + # Change to ".OpenFOAM" to use the OpenFOAM reader provided with OpenFOAM. + touch ${Participant1}.foam + # Remove the log files + rm -fv ${Participant1}_blockMesh.log + rm -fv ${Participant1}_checkMesh.log + rm -fv ${Participant1}_decomposePar.log + rm -fv ${Participant1}.log + rm -fv ${Participant1}_reconstructPar.log + rm -fv \ + precice-*.log \ + precice-*-events.json +cd .. + +# Participant 2: Solid1 (deal.II) +Participant2="solid-left-dealii" +cd ./Solid1/dealii_output + # Clean the case + echo "Cleaning Solid1 case" + rm -fv solution-*.vtk +cd .. + rm -fv \ + precice-*.log \ + precice-*-events.json \ + solution-*.vtk +cd .. + +# Participant 3: Solid2 (deal.II) +Participant3="solid-right-dealii" +cd ./Solid2/dealii_output + # Clean the case + echo "Cleaning Solid2 case" + rm -fv solution-*.vtk +cd .. + rm -fv \ + precice-*.log \ + precice-*-events.json \ + solution-*.vtk +cd .. + +# Remove the preCICE-related log files +echo "Deleting the preCICE log files..." +rm -fv \ + precice-*.log \ + precice-*-events.json + +rm -rfv precice-run +rm -rfv precice-output + + +echo "Cleaning complete!" +#------------------------------------------------------------------------------ diff --git a/multiple-perpendicular-flaps/fluid-openfoam/0.orig/U b/multiple-perpendicular-flaps/fluid-openfoam/0.orig/U new file mode 100644 index 000000000..9f67e7a47 --- /dev/null +++ b/multiple-perpendicular-flaps/fluid-openfoam/0.orig/U @@ -0,0 +1,51 @@ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (5 0 0); + +boundaryField +{ + inlet + { + type fixedValue; + value $internalField; + } + outlet + { + type zeroGradient; + } + flap1 + { + type movingWallVelocity; + value uniform (0 0 0); + } + flap2 + { + type movingWallVelocity; + value uniform (0 0 0); + } + upperWall + { + type noSlip; + } + lowerWall + { + type noSlip; + } + frontAndBack + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/multiple-perpendicular-flaps/fluid-openfoam/0.orig/p b/multiple-perpendicular-flaps/fluid-openfoam/0.orig/p new file mode 100644 index 000000000..ff622213b --- /dev/null +++ b/multiple-perpendicular-flaps/fluid-openfoam/0.orig/p @@ -0,0 +1,53 @@ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type zeroGradient; + } + + outlet + { + type fixedValue; + value uniform 0; + } + + flap1 + { + type zeroGradient; + } + + flap2 + { + type zeroGradient; + } + + upperWall + { + type zeroGradient; + } + + lowerWall + { + type zeroGradient; + } + + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/multiple-perpendicular-flaps/fluid-openfoam/0.orig/phi b/multiple-perpendicular-flaps/fluid-openfoam/0.orig/phi new file mode 100644 index 000000000..176ef2859 --- /dev/null +++ b/multiple-perpendicular-flaps/fluid-openfoam/0.orig/phi @@ -0,0 +1,54 @@ +FoamFile +{ + version 2.0; + format ascii; + class surfaceScalarField; + location "0"; + object phi; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 3 -1 0 0 0 0]; + +internalField uniform 0; +boundaryField +{ + inlet + { + type calculated; + value $internalField; + } + outlet + { + type calculated; + value $internalField; + } + flap1 + { + type calculated; + value uniform 0; + } + flap2 + { + type calculated; + value uniform 0; + } + upperWall + { + type calculated; + value uniform 0; + } + lowerWall + { + type calculated; + value uniform 0; + } + frontAndBack + { + type empty; + value nonuniform 0; + } +} + + +// ************************************************************************* // diff --git a/multiple-perpendicular-flaps/fluid-openfoam/0.orig/pointDisplacement b/multiple-perpendicular-flaps/fluid-openfoam/0.orig/pointDisplacement new file mode 100644 index 000000000..7286c6d38 --- /dev/null +++ b/multiple-perpendicular-flaps/fluid-openfoam/0.orig/pointDisplacement @@ -0,0 +1,56 @@ +FoamFile +{ + version 2.0; + format ascii; + class pointVectorField; + object pointDisplacement; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 0 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + inlet + { + type fixedValue; + value uniform (0 0 0); + } + + outlet + { + type fixedValue; + value uniform (0 0 0); + } + + flap1 + { + type fixedValue; + value $internalField; + } + + flap2 + { + type fixedValue; + value $internalField; + } + + upperWall + { + type slip; + } + + lowerWall + { + type slip; + } + + frontAndBack + { + type empty; + } +} + +// ************************************************************************* // diff --git a/multiple-perpendicular-flaps/fluid-openfoam/constant/dynamicMeshDict b/multiple-perpendicular-flaps/fluid-openfoam/constant/dynamicMeshDict new file mode 100644 index 000000000..2d8f04445 --- /dev/null +++ b/multiple-perpendicular-flaps/fluid-openfoam/constant/dynamicMeshDict @@ -0,0 +1,23 @@ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object dynamicMeshDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dynamicFvMesh dynamicMotionSolverFvMesh; + +motionSolverLibs ("libfvMotionSolvers.so"); + +solver displacementLaplacian; + +displacementLaplacianCoeffs { + + diffusivity quadratic inverseDistance (flap1); + diffusivity quadratic inverseDistance (flap2); + +} diff --git a/multiple-perpendicular-flaps/fluid-openfoam/constant/transportProperties b/multiple-perpendicular-flaps/fluid-openfoam/constant/transportProperties new file mode 100644 index 000000000..bc81706ca --- /dev/null +++ b/multiple-perpendicular-flaps/fluid-openfoam/constant/transportProperties @@ -0,0 +1,15 @@ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +transportModel Newtonian; + +nu nu [ 0 2 -1 0 0 0 0 ] 1e-03; + +// ************************************************************************* // diff --git a/multiple-perpendicular-flaps/fluid-openfoam/constant/turbulenceProperties b/multiple-perpendicular-flaps/fluid-openfoam/constant/turbulenceProperties new file mode 100644 index 000000000..a74ee048f --- /dev/null +++ b/multiple-perpendicular-flaps/fluid-openfoam/constant/turbulenceProperties @@ -0,0 +1,13 @@ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/Fluid.foam b/multiple-perpendicular-flaps/fluid-openfoam/fluid-openfoam.foam similarity index 100% rename from flow-over-heated-plate-steady-state/buoyantSimpleFoam-aster/Fluid/Fluid.foam rename to multiple-perpendicular-flaps/fluid-openfoam/fluid-openfoam.foam diff --git a/multiple-perpendicular-flaps/fluid-openfoam/removeObsoleteFolders.sh b/multiple-perpendicular-flaps/fluid-openfoam/removeObsoleteFolders.sh new file mode 100755 index 000000000..64f62f614 --- /dev/null +++ b/multiple-perpendicular-flaps/fluid-openfoam/removeObsoleteFolders.sh @@ -0,0 +1,20 @@ +#! /bin/bash + +echo "Looking for any time directories without results (e.g. stray functionObjectProperties files, see issue #26 on GitHub)..." + +for f in [0-9]* [0-9]*.[0-9]*; do + if ! [ -f $f/U ] && ! [ -f $f/T ]; then + rm -rfv $f + fi +done +if [ -d processor0 ]; then + for g in processor*; do + cd $g + for f in [0-9]* [0-9]*.[0-9]*; do + if ! [ -f $f/U ] && ! [ -f $f/T ]; then + rm -rfv $f + fi + done + cd .. + done +fi diff --git a/multiple-perpendicular-flaps/fluid-openfoam/run.sh b/multiple-perpendicular-flaps/fluid-openfoam/run.sh new file mode 100755 index 000000000..a0578d367 --- /dev/null +++ b/multiple-perpendicular-flaps/fluid-openfoam/run.sh @@ -0,0 +1,44 @@ +#!/bin/bash +cd ${0%/*} || exit 1 # Run from this directory +. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions + +# Fluid participant + +# Run this script in one terminal and the execute the runSolid1 and runSolid2 in separate terminals. +# These scripts present how the three participants would be started manually. + +# Run this script with "-parallel" for parallel simulations + +# The script "Allclean" cleans-up the result and log files. + +# 1 for true, 0 for false +parallel=0 +if [ "$1" = "-parallel" ]; then + parallel=1 +fi + +echo "Preparing and running the Fluid participant..." + +rm -rfv 0/ +cp -r 0.orig/ 0/ +blockMesh +checkMesh + +# Run +cd Fluid + solver=$(getApplication) + procs=$(getNumberOfProcessors) +cd .. +if [ $parallel -eq 1 ]; then + decomposePar -force + mpirun -np $procs $solver -parallel + reconstructPar +else + $solver +fi + +# Workaround for issue #26 (OF-adapter, relevant for OF .com versions) +./removeObsoleteFolders.sh + +echo "" +echo "### NOTE ### Make sure to use the correct solver for your OpenFOAM version! (pimpleFoam for OpenFOAM v1806, OpenFOAM 6, or newer, vs pimpleDyMFoam for older) You may change this in your Fluid/system/controlDict file, if needed." diff --git a/multiple-perpendicular-flaps/fluid-openfoam/system/blockMeshDict b/multiple-perpendicular-flaps/fluid-openfoam/system/blockMeshDict new file mode 100644 index 000000000..c58e95294 --- /dev/null +++ b/multiple-perpendicular-flaps/fluid-openfoam/system/blockMeshDict @@ -0,0 +1,214 @@ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +scale 1.; + +x0 -3.; +x1 -1.05; +x2 -0.95; +x3 0.95; +x4 1.05; +x5 3.; + +z0 0.; +z1 1.; +z2 4.; + +w 0; +vertices +( + ($x0 $z0 $w ) // 0 + ($x1 $z0 $w ) // 1 + ($x2 $z0 $w ) // 2 + ($x3 $z0 $w ) // 3 + ($x4 $z0 $w ) // 4 + ($x5 $z0 $w ) // 5 + + ($x0 $z1 $w ) // 6 + ($x1 $z1 $w ) // 7 + ($x2 $z1 $w ) // 8 + ($x3 $z1 $w ) // 9 + ($x4 $z1 $w ) // 10 + ($x5 $z1 $w ) // 11 + + ($x0 $z2 $w ) // 12 + ($x1 $z2 $w ) // 13 + ($x2 $z2 $w ) // 14 + ($x3 $z2 $w ) // 15 + ($x4 $z2 $w ) // 16 + ($x5 $z2 $w ) // 17 + + ($x0 $z0 1 ) // 18 + ($x1 $z0 1 ) // 19 + ($x2 $z0 1 ) // 20 + ($x3 $z0 1 ) // 21 + ($x4 $z0 1 ) // 22 + ($x5 $z0 1 ) // 23 + ($x0 $z1 1 ) // 24 + ($x1 $z1 1 ) // 25 + ($x2 $z1 1 ) // 26 + ($x3 $z1 1 ) // 27 + ($x4 $z1 1 ) // 28 + ($x5 $z1 1 ) // 29 + ($x0 $z2 1 ) // 30 + ($x1 $z2 1 ) // 31 + ($x2 $z2 1 ) // 32 + ($x3 $z2 1 ) // 33 + ($x4 $z2 1 ) // 34 + ($x5 $z2 1 ) // 35 + + +); + +// Grading +h1 20; +h2 4; +h3 25; +v1 20; +v2 45; + +blocks +( + hex ( 0 1 7 6 18 19 25 24 ) + ($h1 $v1 1 ) + simpleGrading (0.5 1 1) + + hex ( 2 3 9 8 20 21 27 26 ) + ($h3 $v1 1) + simpleGrading (1 1 1) + + hex ( 4 5 11 10 22 23 29 28 ) + ($h1 $v1 1) + simpleGrading (2 1 1) + + + hex ( 6 7 13 12 24 25 31 30 ) + ($h1 $v2 1 ) + simpleGrading (0.5 1.2 1) + + hex ( 8 9 15 14 26 27 33 32 ) + ($h3 $v2 1) + simpleGrading (1 1.2 1) + + hex ( 10 11 17 16 28 29 35 34 ) + ($h1 $v2 1) + simpleGrading (2 1.2 1) + + + hex ( 7 8 14 13 25 26 32 31 ) + ($h2 $v2 1) + simpleGrading (1 1.2 1) + + hex ( 9 10 16 15 27 28 34 33 ) + ($h2 $v2 1) + simpleGrading (1 1.2 1) + + +); + +edges +( +); + +boundary +( + inlet + { + type patch; + faces + ( + ( 0 6 24 18 ) + ( 6 12 30 24 ) + ); + } + outlet + { + type patch; + faces + ( + ( 5 11 29 23 ) + ( 11 17 35 29 ) + ); + } + + flap1 + { + type wall; + faces + ( + ( 1 7 25 19 ) + ( 7 8 26 25 ) + ( 8 2 20 26 ) //reverse + + ); + } + + flap2 + { + type wall; + faces + ( + ( 3 9 27 21 ) + ( 9 10 28 27 ) + ( 10 4 22 28 ) //reverse + + ); + } + + + upperWall + { + type wall; + faces + ( + ( 12 13 31 30 ) + ( 13 14 32 31 ) + ( 14 15 33 32 ) + ( 15 16 34 33 ) + ( 16 17 35 34 ) + ); + } + lowerWall + { + type wall; + faces + ( + ( 0 1 19 18 ) + ( 2 3 21 20 ) + ( 4 5 23 22 ) + ); + } + frontAndBack + { + type empty; + faces + ( + ( 0 1 7 6 ) //front bottom + ( 2 3 9 8 ) + ( 4 5 11 10 ) + ( 6 7 13 12 ) //front top + ( 7 8 14 13 ) + ( 8 9 15 14 ) + ( 9 10 16 15 ) + ( 10 11 17 16 ) + + + ( 18 19 25 24 ) //back bottom + ( 20 21 27 26 ) + ( 22 23 29 28 ) + ( 24 25 31 30 ) // back top + ( 25 26 32 31 ) + ( 26 27 33 32 ) + ( 27 28 34 33 ) + ( 28 29 35 34 ) + ); + } +); + +// ************************************************************************* // diff --git a/multiple-perpendicular-flaps/fluid-openfoam/system/controlDict b/multiple-perpendicular-flaps/fluid-openfoam/system/controlDict new file mode 100644 index 000000000..19433cd34 --- /dev/null +++ b/multiple-perpendicular-flaps/fluid-openfoam/system/controlDict @@ -0,0 +1,49 @@ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Note: With OpenFOAM v1806 and OpenFOAM 6, the DyM solvers +// were marked deprecated and merged into their respective standard solvers. +application pimpleFoam; // OpenFOAM v1806, OpenFOAM 6, or newer +// application pimpleDyMFoam; // OpenFOAM v1712, OpenFOAM 5.x, or older + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 10; + +deltaT 0.01; + +writeControl adjustableRunTime; + +writeInterval 0.1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +functions +{ + preCICE_Adapter + { + type preciceAdapterFunctionObject; + libs ("libpreciceAdapterFunctionObject.so"); + } +} diff --git a/multiple-perpendicular-flaps/fluid-openfoam/system/decomposeParDict b/multiple-perpendicular-flaps/fluid-openfoam/system/decomposeParDict new file mode 100644 index 000000000..32d1262d7 --- /dev/null +++ b/multiple-perpendicular-flaps/fluid-openfoam/system/decomposeParDict @@ -0,0 +1,17 @@ +FoamFile { + version 2.0; + class dictionary; + object decomposeParDict; + format ascii; +} + +numberOfSubdomains 4; + +method simple; + +simpleCoeffs +{ + n (2 2 1); + delta 0.001; +} + diff --git a/multiple-perpendicular-flaps/fluid-openfoam/system/fvSchemes b/multiple-perpendicular-flaps/fluid-openfoam/system/fvSchemes new file mode 100644 index 000000000..812dea539 --- /dev/null +++ b/multiple-perpendicular-flaps/fluid-openfoam/system/fvSchemes @@ -0,0 +1,44 @@ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) bounded Gauss upwind; + div((nuEff*dev2(T(grad(U))))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + + +// ************************************************************************* // diff --git a/multiple-perpendicular-flaps/fluid-openfoam/system/fvSolution b/multiple-perpendicular-flaps/fluid-openfoam/system/fvSolution new file mode 100644 index 000000000..134915d5f --- /dev/null +++ b/multiple-perpendicular-flaps/fluid-openfoam/system/fvSolution @@ -0,0 +1,81 @@ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + + p + { + + solver PCG; + preconditioner DIC; + tolerance 1e-8; + relTol 1.0e-3; + } + + pFinal + { + $p; + relTol 0; + } + + pcorr + { + $p; + } + + pcorrFinal + { + $pcorr; + relTol 0; + } + + Phi + { + $p; + } + + "(U|cellDisplacement)" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-6; + relTol 1e-4; + minIter 2; + } + + "(U|cellDisplacement)Final" + { + $U; + relTol 0; + } +} + +PIMPLE +{ + nCorrectors 4; + nNonOrthogonalCorrectors 1; + // tolerance 1.0e-14; + // relTol 5e-3; + consistent true; + correctPhi true; + momentumPredictor true; + nOuterCorrectors 1; +} + + +potentialFlow +{ + nNonOrthogonalCorrectors 10; +} + + + +// ************************************************************************* // diff --git a/multiple-perpendicular-flaps/fluid-openfoam/system/preciceDict b/multiple-perpendicular-flaps/fluid-openfoam/system/preciceDict new file mode 100644 index 000000000..f53de6925 --- /dev/null +++ b/multiple-perpendicular-flaps/fluid-openfoam/system/preciceDict @@ -0,0 +1,86 @@ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object preciceDict; +} + +preciceConfig "../precice-config.xml"; + +participant Fluid; + +modules (FSI); + +interfaces +{ + Interface1 + { + mesh Fluid1-Mesh-Centers; + patches (flap1); + locations faceCenters; + + readData + ( + ); + + writeData + ( + Stress1 + ); + }; + + Interface2 + { + mesh Fluid1-Mesh-Nodes; + patches (flap1); + locations faceNodes; + + readData + ( + Displacement1 + ); + + writeData + ( + ); + }; + + Interface3 + { + mesh Fluid2-Mesh-Centers; + patches (flap2); + locations faceCenters; + + readData + ( + ); + + writeData + ( + Stress2 + ); + }; + + Interface4 + { + mesh Fluid2-Mesh-Nodes; + patches (flap2); + locations faceNodes; + + readData + ( + Displacement2 + ); + + writeData + ( + ); + }; +}; + +FSI +{ + rho rho [1 -3 0 0 0 0 0] 1; +} diff --git a/multiple-perpendicular-flaps/images/results.png b/multiple-perpendicular-flaps/images/results.png new file mode 100644 index 000000000..aedc406db Binary files /dev/null and b/multiple-perpendicular-flaps/images/results.png differ diff --git a/multiple-perpendicular-flaps/images/setup_twoflaps.png b/multiple-perpendicular-flaps/images/setup_twoflaps.png new file mode 100644 index 000000000..a8a124666 Binary files /dev/null and b/multiple-perpendicular-flaps/images/setup_twoflaps.png differ diff --git a/multiple-perpendicular-flaps/precice-config.xml b/multiple-perpendicular-flaps/precice-config.xml new file mode 100644 index 000000000..e21b46e4c --- /dev/null +++ b/multiple-perpendicular-flaps/precice-config.xml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/Inner-Fluid.OpenFOAM b/multiple-perpendicular-flaps/solid-left-dealii/dealii_output/.keepme similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Inner-Fluid/Inner-Fluid.OpenFOAM rename to multiple-perpendicular-flaps/solid-left-dealii/dealii_output/.keepme diff --git a/multiple-perpendicular-flaps/solid-left-dealii/linear_elasticity.prm b/multiple-perpendicular-flaps/solid-left-dealii/linear_elasticity.prm new file mode 100644 index 000000000..019f7f406 --- /dev/null +++ b/multiple-perpendicular-flaps/solid-left-dealii/linear_elasticity.prm @@ -0,0 +1,71 @@ +# Listing of Parameters +# Dimensional quantities are in SI units +# -------------------------------------- + +subsection Time + # End time + set End time = 5 + + # Time step size + set Time step size = 0.01 + + # Write results every x timesteps + set Output interval = 10 +end + +subsection Discretization + # Time integration scheme + # 0 = forward, 1 = backward + set theta = 0.5 + + # Polynomial degree of the FE system + set Polynomial degree = 4 +end + +subsection System properties + # mu (shear modulus) + set mu = 153846 + + # lambda + set lambda = 230769 + + # density + set rho = 3000 + + # body forces x,y,z + set body forces = 0.0,0.0,0.0 +end + +subsection Linear solver + # Linear solver iterations (multiples of the system matrix size) + set Max iteration multiplier = 1 + + # Linear solver residual (scaled by residual norm) + set Residual = 1e-6 + + # Linear solver: CG or Direct + set Solver type = Direct +end + +subsection precice configuration + # Cases: FSI3 or PF for perpendicular flap + set Scenario = PF + + # Name of the precice configuration file + set precice config-file = ../precice-config.xml + + # Name of the participant in the precice-config.xml file + set Participant name = Solid1 + + # Name of the coupling mesh in the precice-config.xml file + set Mesh name = Solid1-Mesh + + # Name of the read data in the precice-config.xml file + set Read data name = Stress1 + + # Name of the write data in the precice-config.xml file + set Write data name = Displacement1 + + # PF x-location + set Flap location = -1.0 +end diff --git a/multiple-perpendicular-flaps/solid-left-dealii/nonlinear_elasticity.prm b/multiple-perpendicular-flaps/solid-left-dealii/nonlinear_elasticity.prm new file mode 100644 index 000000000..cf1d4fdab --- /dev/null +++ b/multiple-perpendicular-flaps/solid-left-dealii/nonlinear_elasticity.prm @@ -0,0 +1,84 @@ +# Listing of Parameters +# Dimensional quantities are in SI units +# -------------------------------------- + +subsection Time + # End time + set End time = 5 + + # Time step size + set Time step size = 0.01 + + # Output interval + set Output interval = 10 +end + +subsection Discretization + # Newmark beta + set beta = 0.25 + + # Newmark gamma + set gamma = 0.5 + + # Polynomial degree of the FE system + set Polynomial degree = 4 +end + +subsection System properties + # Poisson's ratio + set Poisson's ratio = 0.375 + + # Shear modulus + set Shear modulus = 153846 + + # Density + set rho = 3000 + + # Body forces x,y,z + set body forces = 0.0,0.0,0.0 +end + +subsection Linear solver + # Linear solver iterations (multiples of the system matrix size) + set Max iteration multiplier = 1 + + # Linear solver residual (scaled by residual norm) + set Residual = 1e-6 + + # Linear solver: CG or Direct + set Solver type = Direct +end + +subsection Nonlinear solver + # Number of Newton-Raphson iterations allowed + set Max iterations Newton-Raphson = 10 + + # Displacement error tolerance + set Tolerance displacement = 1.0e-6 + + # Force residual tolerance + set Tolerance force = 1.0e-9 +end + +subsection precice configuration + # Cases: FSI3 or PF for perpendicular flap + set Scenario = PF + + # Name of the precice configuration file + set precice config-file = ../precice-config.xml + + # Name of the participant in the precice-config.xml file + set Participant name = Solid1 + + # Name of the coupling mesh in the precice-config.xml file + set Mesh name = Solid1-Mesh + + # Name of the read data in the precice-config.xml file + set Read data name = Stress1 + + # Name of the write data in the precice-config.xml file + set Write data name = Displacement1 + + # PF x-location + set Flap location = -1.0 +end diff --git a/multiple-perpendicular-flaps/solid-left-dealii/plotDisplacement.sh b/multiple-perpendicular-flaps/solid-left-dealii/plotDisplacement.sh new file mode 100755 index 000000000..62565e334 --- /dev/null +++ b/multiple-perpendicular-flaps/solid-left-dealii/plotDisplacement.sh @@ -0,0 +1,9 @@ +#! /bin/bash +gnuplot -p << EOF +set grid +set title 'Displacement of the Flap Tip' +set xlabel 'Time [s]' +set ylabel 'X-Displacement [m]' +plot "precice-Solid1-watchpoint-flap_tip.log" using 1:4 title 'Top displacemement' with lines +EOF + diff --git a/multiple-perpendicular-flaps/solid-left-dealii/run.sh b/multiple-perpendicular-flaps/solid-left-dealii/run.sh new file mode 100755 index 000000000..57978366e --- /dev/null +++ b/multiple-perpendicular-flaps/solid-left-dealii/run.sh @@ -0,0 +1,27 @@ +#!/bin/bash +cd ${0%/*} || exit 1 # Run from this directory + +# Solid1 participant + +# Run this script in one terminal and the execute the Fluid participant +# and the Solid2 participant in another terminal. +# These scripts present how the three participants would be started manually. + +# 1 for true, 0 for false +nonlinear=0 +if [ "$1" = "-nonlinear" ]; then + nonlinear=1 +fi + +linear=0 +if [ "$1" = "-linear" ]; then + linear=1 +fi + +if [ $linear -eq 1 ]; then + ./linear_elasticity linear_elasticity.prm +elif [ $nonlinear -eq 1 ]; then + ./nonlinear_elasticity nonlinear_elasticity.prm +else + echo "No solver type specified. Please specify -linear or -nonlinear as solver type" +fi diff --git a/heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/Outer-Fluid.OpenFOAM b/multiple-perpendicular-flaps/solid-right-dealii/dealii_output/.keepme similarity index 100% rename from heat-exchanger/buoyantSimpleFoam-CalculiX/Outer-Fluid/Outer-Fluid.OpenFOAM rename to multiple-perpendicular-flaps/solid-right-dealii/dealii_output/.keepme diff --git a/multiple-perpendicular-flaps/solid-right-dealii/linear_elasticity.prm b/multiple-perpendicular-flaps/solid-right-dealii/linear_elasticity.prm new file mode 100644 index 000000000..e5cab3f73 --- /dev/null +++ b/multiple-perpendicular-flaps/solid-right-dealii/linear_elasticity.prm @@ -0,0 +1,71 @@ +# Listing of Parameters +# Dimensional quantities are in SI units +# -------------------------------------- + +subsection Time + # End time + set End time = 5 + + # Time step size + set Time step size = 0.01 + + # Write results every x timesteps + set Output interval = 10 +end + +subsection Discretization + # Time integration scheme + # 0 = forward, 1 = backward + set theta = 0.5 + + # Polynomial degree of the FE system + set Polynomial degree = 4 +end + +subsection System properties + # mu (shear modulus) + set mu = 153846 + + # lambda + set lambda = 230769 + + # density + set rho = 3000 + + # body forces x,y,z + set body forces = 0.0,0.0,0.0 +end + +subsection Linear solver + # Linear solver iterations (multiples of the system matrix size) + set Max iteration multiplier = 1 + + # Linear solver residual (scaled by residual norm) + set Residual = 1e-6 + + # Linear solver: CG or Direct + set Solver type = Direct +end + +subsection precice configuration + # Cases: FSI3 or PF for perpendicular flap + set Scenario = PF + + # Name of the precice configuration file + set precice config-file = ../precice-config.xml + + # Name of the participant in the precice-config.xml file + set Participant name = Solid2 + + # Name of the coupling mesh in the precice-config.xml file + set Mesh name = Solid2-Mesh + + # Name of the read data in the precice-config.xml file + set Read data name = Stress2 + + # Name of the write data in the precice-config.xml file + set Write data name = Displacement2 + + # PF x-location + set Flap location = 1.0 +end diff --git a/multiple-perpendicular-flaps/solid-right-dealii/nonlinear_elasticity.prm b/multiple-perpendicular-flaps/solid-right-dealii/nonlinear_elasticity.prm new file mode 100644 index 000000000..f0f1289ee --- /dev/null +++ b/multiple-perpendicular-flaps/solid-right-dealii/nonlinear_elasticity.prm @@ -0,0 +1,84 @@ +# Listing of Parameters +# Dimensional quantities are in SI units +# -------------------------------------- + +subsection Time + # End time + set End time = 5 + + # Time step size + set Time step size = 0.01 + + # Output interval + set Output interval = 10 +end + +subsection Discretization + # Newmark beta + set beta = 0.25 + + # Newmark gamma + set gamma = 0.5 + + # Polynomial degree of the FE system + set Polynomial degree = 4 +end + +subsection System properties + # Poisson's ratio + set Poisson's ratio = 0.375 + + # Shear modulus + set Shear modulus = 153846 + + # Density + set rho = 3000 + + # Body forces x,y,z + set body forces = 0.0,0.0,0.0 +end + +subsection Linear solver + # Linear solver iterations (multiples of the system matrix size) + set Max iteration multiplier = 1 + + # Linear solver residual (scaled by residual norm) + set Residual = 1e-6 + + # Linear solver: CG or Direct + set Solver type = Direct +end + +subsection Nonlinear solver + # Number of Newton-Raphson iterations allowed + set Max iterations Newton-Raphson = 10 + + # Displacement error tolerance + set Tolerance displacement = 1.0e-6 + + # Force residual tolerance + set Tolerance force = 1.0e-9 +end + +subsection precice configuration + # Cases: FSI3 or PF for perpendicular flap + set Scenario = PF + + # Name of the precice configuration file + set precice config-file = ../precice-config.xml + + # Name of the participant in the precice-config.xml file + set Participant name = Solid2 + + # Name of the coupling mesh in the precice-config.xml file + set Mesh name = Solid2-Mesh + + # Name of the read data in the precice-config.xml file + set Read data name = Stress2 + + # Name of the write data in the precice-config.xml file + set Write data name = Displacement2 + + # PF x-location + set Flap location = 1.0 +end diff --git a/multiple-perpendicular-flaps/solid-right-dealii/plotDisplacement.sh b/multiple-perpendicular-flaps/solid-right-dealii/plotDisplacement.sh new file mode 100755 index 000000000..e6fa0f1e8 --- /dev/null +++ b/multiple-perpendicular-flaps/solid-right-dealii/plotDisplacement.sh @@ -0,0 +1,9 @@ +#! /bin/bash +gnuplot -p << EOF +set grid +set title 'Displacement of the Flap Tip' +set xlabel 'Time [s]' +set ylabel 'X-Displacement [m]' +plot "precice-Solid2-watchpoint-flap_tip.log" using 1:4 title 'Top displacemement' with lines +EOF + diff --git a/multiple-perpendicular-flaps/solid-right-dealii/run.sh b/multiple-perpendicular-flaps/solid-right-dealii/run.sh new file mode 100755 index 000000000..c85f04d60 --- /dev/null +++ b/multiple-perpendicular-flaps/solid-right-dealii/run.sh @@ -0,0 +1,27 @@ +#!/bin/bash +cd ${0%/*} || exit 1 # Run from this directory + +# Solid2 participant + +# Run this script in one terminal and the execute the Fluid participant +# and the Solid1 participant in another terminal. +# These scripts present how the three participants would be started manually. + +# 1 for true, 0 for false +nonlinear=0 +if [ "$1" = "-nonlinear" ]; then + nonlinear=1 +fi + +linear=0 +if [ "$1" = "-linear" ]; then + linear=1 +fi + +if [ $linear -eq 1 ]; then + ./linear_elasticity linear_elasticity.prm +elif [ $nonlinear -eq 1 ]; then + ./nonlinear_elasticity nonlinear_elasticity.prm +else + echo "No solver type specified. Please specify -linear or -nonlinear as solver type" +fi diff --git a/partitioned-elastic-beam/CalculiX-CalculiX/Allrun b/partitioned-elastic-beam/CalculiX-CalculiX/Allrun deleted file mode 100755 index c6ee5bbea..000000000 --- a/partitioned-elastic-beam/CalculiX-CalculiX/Allrun +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash -cd ${0%/*} || exit 1 # Run from this directory - -# This script prepares and runs all the participants in one terminal, -# forwarding the solvers' output to log files. -# You need to first download the mesh files separately using the Download_meshes script. -# The script "Allclean" cleans-up the result and log files. - -# Participant 1: Calculix1Mesh -Participant1="Calculix1Mesh" -CalculixSolver="/path/to/Calculix/ccx_preCICE" - - # Run and get the process id - echo "Starting the ${Participant1} participant..." - export OMP_NUM_THREADS=1 - export CCX_NPROC_EQUATION_SOLVER=1 - ${CalculixSolver} -i beam1 -precice-participant Calculix1 > ${Participant1}.log 2>&1 & - PIDParticipant1=$! - -# Participant 2: Calculix2Mesh -Participant2="Calculix2Mesh" - - # Run and get the process id - echo "Starting the ${Participant2} participant..." - export OMP_NUM_THREADS=1 - export CCX_NPROC_EQUATION_SOLVER=1 - ${CalculixSolver} -i beam2 -precice-participant Calculix2 > ${Participant2}.log 2>&1 & - PIDParticipant2=$! - -# =============== Wait for all the participants to finish ======= -echo "Waiting for the participants to exit..., PIDs: ${PIDParticipant1}, ${PIDParticipant2}" -echo "(you may run 'tail -f ${Participant1}.log' in another terminal to check the progress)" -echo "To kill midrun, press 'c'. Ctrl+C will cause the processes to run in the background." -while [ -e /proc/${PIDParticipant1} ]; do - read -r -t1 -n1 input - if [ "$input" = "c" ]; then - kill ${PIDParticipant1} - kill ${PIDParticipant2} - false - fi -done - if [ $? -ne 0 ] || [ "$(grep -c -E "error:" ${Participant1}.log)" -ne 0 ] || [ "$(grep -c -E "error:" ${Participant2}.log)" -ne 0 ]; then - echo "" - echo "Something went wrong... See the log files for more." - # precaution - kill ${PIDParticipant1} - kill ${PIDParticipant2} -else - echo "" - echo "The simulation completed!" -fi diff --git a/partitioned-elastic-beam/CalculiX-CalculiX/README.md b/partitioned-elastic-beam/CalculiX-CalculiX/README.md deleted file mode 100644 index dead46e0d..000000000 --- a/partitioned-elastic-beam/CalculiX-CalculiX/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Tutorial for a coupled simulation with two instances of CalculiX - -The files in this folder can be used to run the tutorial test case described on this [Wiki page](https://github.com/precice/precice/wiki/Tutorial-for-SSI-with-CalculiX). For running the case either follow the instructions given there or execute the script `runTutorial.sh`. diff --git a/partitioned-elastic-beam/CalculiX-CalculiX/config.yml b/partitioned-elastic-beam/CalculiX-CalculiX/config.yml deleted file mode 100755 index b811c08bc..000000000 --- a/partitioned-elastic-beam/CalculiX-CalculiX/config.yml +++ /dev/null @@ -1,17 +0,0 @@ -participants: - - Calculix1: - interfaces: - - nodes-mesh: Calculix_Mesh1 - patch: surface - read-data: [Displacements0] - write-data: [Forces0] - - Calculix2: - interfaces: - - nodes-mesh: Calculix_Mesh2 - patch: surface - read-data: [Forces0] - write-data: [Displacements0] - -precice-config-file: ./precice-config.xml diff --git a/partitioned-elastic-beam/CalculiX-CalculiX/precice-config.xml b/partitioned-elastic-beam/CalculiX-CalculiX/precice-config.xml deleted file mode 100755 index ae4e3f578..000000000 --- a/partitioned-elastic-beam/CalculiX-CalculiX/precice-config.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/partitioned-elastic-beam/README.md b/partitioned-elastic-beam/README.md index 7e6cccc3c..a0078f22b 100644 --- a/partitioned-elastic-beam/README.md +++ b/partitioned-elastic-beam/README.md @@ -1,8 +1,31 @@ --- title: Partitioned elastic beam permalink: tutorials-partitioned-elastic-beam.html -keywords: -summary: +keywords: Structure-Structure Coupling, CalculiX, solid mechanics +summary: This tutorial describes how to run a structure-structure interaction simulation with CalculiX running on both sides. --- {% include important.html content="We have not yet ported the documentation of the preCICE tutorials from the preCICE wiki to here. Please go to the [preCICE wiki](https://github.com/precice/precice/wiki#2-getting-started---tutorials)" %} + +## Setup + +We have a rectangular linear elastic beam of dimensions 1 x 1 x 8 m, divided in two subdomains by a splitting plane at z = 6 m. This plane corresponds to the coupling surface. Both ends of the beam (z = 0 and z = 8 m) are fixed. A mechanical load F = -0.001 N is applied constantly along the y-axis onto a small set of nodes near the end of the beam. These boundary conditions can be seen in the input files `beam.inp`. Initial conditions are zero both for position and velocity. Other parameters can be found and customized in the `.inp` files. + +![beam setup](images/beam_setup.png) + +## Available solvers + +* CalculiX. CalculiX is used for both structural parts. For more information, have a look at the [CalculiX adapter documentation](adapter-calculix-overview.html) for more. + + +## Running the Simulation + +The prepared case already contains configuration and mesh files, so that the simulation is ready to run. You can start the simulation by running the script `./run.sh` located in each participant directory. You will see both participants of the simulation running simultaneously. + +## Post-processing + +To see an animated visualization of the results, you can run the script `./visualize.py`. It joins the `*.frd` output files of both participants to form a new file with the entire beam. Then, it calls `cgx`, since CalculiX results can only be visualized with this graphic tool. If you want to use e.g. Paraview, you may use converting tools. + +![beam results](images/beam_results.png) + +You can open result files directly with `cgx` with the command `cgx beam1.frd`, for instance. diff --git a/partitioned-elastic-beam/clean.sh b/partitioned-elastic-beam/clean.sh new file mode 100755 index 000000000..00da1b0db --- /dev/null +++ b/partitioned-elastic-beam/clean.sh @@ -0,0 +1,38 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +echo "Cleaning..." + + +Participant1="dirichlet-calculix" +cd ${Participant1} + # Clean the case + rm -fv *.log + rm -fv beam1.cvg + rm -fv beam1.dat + rm -fv beam1.frd + rm -fv beam1.sta + rm -fv beam1.12d + rm -fv spooles.out + rm -fv precice-*.log + rm -fv precice-*-events.json +cd .. + +Participant2="neumann-calculix" +cd ${Participant2} + # Clean the case + rm -fv *.log + rm -fv beam2.cvg + rm -fv beam2.dat + rm -fv beam2.frd + rm -fv beam2.sta + rm -fv beam2.12d + rm -fv spooles.out + rm -fv precice-*.log + rm -fv precice-*-events.json +cd .. +# Remove the preCICE address files +rm -rfv precice-run + +echo "Cleaning complete!" +#------------------------------------------------------------------------------ diff --git a/partitioned-elastic-beam/CalculiX-CalculiX/Calculix1Mesh/all.msh b/partitioned-elastic-beam/dirichlet-calculix/all.msh old mode 100755 new mode 100644 similarity index 100% rename from partitioned-elastic-beam/CalculiX-CalculiX/Calculix1Mesh/all.msh rename to partitioned-elastic-beam/dirichlet-calculix/all.msh diff --git a/partitioned-elastic-beam/CalculiX-CalculiX/beam1.inp b/partitioned-elastic-beam/dirichlet-calculix/beam1.inp old mode 100755 new mode 100644 similarity index 73% rename from partitioned-elastic-beam/CalculiX-CalculiX/beam1.inp rename to partitioned-elastic-beam/dirichlet-calculix/beam1.inp index 3364de320..26c4d2148 --- a/partitioned-elastic-beam/CalculiX-CalculiX/beam1.inp +++ b/partitioned-elastic-beam/dirichlet-calculix/beam1.inp @@ -2,9 +2,9 @@ ** Structure: part 1 of cantilever beam. ** ** -*INCLUDE, INPUT=Calculix1Mesh/all.msh -*INCLUDE, INPUT=Calculix1Mesh/fix1_beam.nam -*INCLUDE, INPUT=Calculix1Mesh/interface_beam.nam +*INCLUDE, INPUT=./all.msh +*INCLUDE, INPUT=./fix1_beam.nam +*INCLUDE, INPUT=./interface_beam.nam *BOUNDARY FIX, 1, 3 *BOUNDARY diff --git a/partitioned-elastic-beam/dirichlet-calculix/config.yml b/partitioned-elastic-beam/dirichlet-calculix/config.yml new file mode 100644 index 000000000..6cd31537c --- /dev/null +++ b/partitioned-elastic-beam/dirichlet-calculix/config.yml @@ -0,0 +1,9 @@ +participants: + Calculix1: + interfaces: + - nodes-mesh: Calculix-Mesh1 + patch: surface + read-data: [Displacement0] + write-data: [Force0] + +precice-config-file: ../precice-config.xml diff --git a/partitioned-elastic-beam/CalculiX-CalculiX/Calculix1Mesh/fix1_beam.nam b/partitioned-elastic-beam/dirichlet-calculix/fix1_beam.nam old mode 100755 new mode 100644 similarity index 100% rename from partitioned-elastic-beam/CalculiX-CalculiX/Calculix1Mesh/fix1_beam.nam rename to partitioned-elastic-beam/dirichlet-calculix/fix1_beam.nam diff --git a/partitioned-elastic-beam/CalculiX-CalculiX/Calculix1Mesh/interface_beam.nam b/partitioned-elastic-beam/dirichlet-calculix/interface_beam.nam old mode 100755 new mode 100644 similarity index 100% rename from partitioned-elastic-beam/CalculiX-CalculiX/Calculix1Mesh/interface_beam.nam rename to partitioned-elastic-beam/dirichlet-calculix/interface_beam.nam diff --git a/partitioned-elastic-beam/dirichlet-calculix/run.sh b/partitioned-elastic-beam/dirichlet-calculix/run.sh new file mode 100755 index 000000000..b1371f82a --- /dev/null +++ b/partitioned-elastic-beam/dirichlet-calculix/run.sh @@ -0,0 +1,13 @@ +#!/bin/bash +cd ${0%/*} || exit 1 # Run from this directory + +# This script prepares and runs the CalculiX solver + +# =============== Participant: Solid =========================== +Solver="ccx_preCICE" + + # Run and get the process id + echo "Starting the CalculiX..." + export OMP_NUM_THREADS=1 + export CCX_NPROC_EQUATION_SOLVER=1 + ${Solver} -i beam1 -precice-participant Calculix1 diff --git a/partitioned-elastic-beam/images/beam_results.png b/partitioned-elastic-beam/images/beam_results.png new file mode 100644 index 000000000..7aacf1683 Binary files /dev/null and b/partitioned-elastic-beam/images/beam_results.png differ diff --git a/partitioned-elastic-beam/images/beam_setup.png b/partitioned-elastic-beam/images/beam_setup.png new file mode 100644 index 000000000..1fc40f556 Binary files /dev/null and b/partitioned-elastic-beam/images/beam_setup.png differ diff --git a/partitioned-elastic-beam/CalculiX-CalculiX/Calculix2Mesh/all.msh b/partitioned-elastic-beam/neumann-calculix/all.msh old mode 100755 new mode 100644 similarity index 100% rename from partitioned-elastic-beam/CalculiX-CalculiX/Calculix2Mesh/all.msh rename to partitioned-elastic-beam/neumann-calculix/all.msh diff --git a/partitioned-elastic-beam/CalculiX-CalculiX/beam2.inp b/partitioned-elastic-beam/neumann-calculix/beam2.inp old mode 100755 new mode 100644 similarity index 78% rename from partitioned-elastic-beam/CalculiX-CalculiX/beam2.inp rename to partitioned-elastic-beam/neumann-calculix/beam2.inp index ac37f0d10..8e0e08f35 --- a/partitioned-elastic-beam/CalculiX-CalculiX/beam2.inp +++ b/partitioned-elastic-beam/neumann-calculix/beam2.inp @@ -2,9 +2,9 @@ ** Structure: part 2 of cantilever beam. ** ** -*INCLUDE, INPUT=Calculix2Mesh/all.msh -*INCLUDE, INPUT=Calculix2Mesh/fix1_beam.nam -*INCLUDE, INPUT=Calculix2Mesh/interface_beam.nam +*INCLUDE, INPUT=./all.msh +*INCLUDE, INPUT=./fix1_beam.nam +*INCLUDE, INPUT=./interface_beam.nam *BOUNDARY FIX, 1, 3 *NSET, NSET=Nload diff --git a/partitioned-elastic-beam/neumann-calculix/config.yml b/partitioned-elastic-beam/neumann-calculix/config.yml new file mode 100644 index 000000000..793f41626 --- /dev/null +++ b/partitioned-elastic-beam/neumann-calculix/config.yml @@ -0,0 +1,9 @@ +participants: + Calculix2: + interfaces: + - nodes-mesh: Calculix-Mesh2 + patch: surface + read-data: [Force0] + write-data: [Displacement0] + +precice-config-file: ../precice-config.xml diff --git a/partitioned-elastic-beam/CalculiX-CalculiX/Calculix2Mesh/fix1_beam.nam b/partitioned-elastic-beam/neumann-calculix/fix1_beam.nam old mode 100755 new mode 100644 similarity index 100% rename from partitioned-elastic-beam/CalculiX-CalculiX/Calculix2Mesh/fix1_beam.nam rename to partitioned-elastic-beam/neumann-calculix/fix1_beam.nam diff --git a/partitioned-elastic-beam/CalculiX-CalculiX/Calculix2Mesh/interface_beam.nam b/partitioned-elastic-beam/neumann-calculix/interface_beam.nam old mode 100755 new mode 100644 similarity index 100% rename from partitioned-elastic-beam/CalculiX-CalculiX/Calculix2Mesh/interface_beam.nam rename to partitioned-elastic-beam/neumann-calculix/interface_beam.nam diff --git a/partitioned-elastic-beam/neumann-calculix/run.sh b/partitioned-elastic-beam/neumann-calculix/run.sh new file mode 100755 index 000000000..455605669 --- /dev/null +++ b/partitioned-elastic-beam/neumann-calculix/run.sh @@ -0,0 +1,13 @@ +#!/bin/bash +cd ${0%/*} || exit 1 # Run from this directory + +# This script prepares and runs the CalculiX solver + +# =============== Participant: Solid =========================== +Solver="ccx_preCICE" + + # Run and get the process id + echo "Starting the CalculiX..." + export OMP_NUM_THREADS=1 + export CCX_NPROC_EQUATION_SOLVER=1 + ${Solver} -i beam2 -precice-participant Calculix2 diff --git a/partitioned-elastic-beam/precice-config.xml b/partitioned-elastic-beam/precice-config.xml new file mode 100644 index 000000000..eea9ea6ac --- /dev/null +++ b/partitioned-elastic-beam/precice-config.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/partitioned-elastic-beam/CalculiX-CalculiX/visualize.fbd b/partitioned-elastic-beam/visualize.fbd similarity index 100% rename from partitioned-elastic-beam/CalculiX-CalculiX/visualize.fbd rename to partitioned-elastic-beam/visualize.fbd diff --git a/partitioned-elastic-beam/CalculiX-CalculiX/visualize.py b/partitioned-elastic-beam/visualize.py similarity index 98% rename from partitioned-elastic-beam/CalculiX-CalculiX/visualize.py rename to partitioned-elastic-beam/visualize.py index c9d22e631..f609ce1b7 100755 --- a/partitioned-elastic-beam/CalculiX-CalculiX/visualize.py +++ b/partitioned-elastic-beam/visualize.py @@ -118,5 +118,5 @@ def join_frd( frd1, frd2 ): ########################## MAIN ################################# -join_frd( "beam1.frd", "beam2.frd" ) +join_frd( "dirichlet-calculix/beam1.frd", "neumann-calculix/beam2.frd" ) subprocess.call(["cgx", "-b", "visualize.fbd"])