-
-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Perpendicular flap (IGA solid participant G+Smo) #603
Open
Crazy-Rich-Meghan
wants to merge
40
commits into
precice:develop
Choose a base branch
from
Crazy-Rich-Meghan:perpendicular-flap-gismo-elasticity-stress
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
afb8731
Update G+Smo solid participant elasticity file
Crazy-Rich-Meghan f00d9f9
Merge branch 'precice:develop' into perpendicular-flap-gismo-elasticity
Crazy-Rich-Meghan 52cc0bc
Modified the precice-config.xml to communicate with stress instead of…
Crazy-Rich-Meghan 1a929ab
Update documentation for solid-gismo.cpp
Crazy-Rich-Meghan f82fa19
Create solid-gismo; Modified fluid-nutils and fluid-openfoam to give …
Crazy-Rich-Meghan 3dd6ac5
Update the README.md file for the tutorial with G+Smo
Crazy-Rich-Meghan be3a0db
Updated README.md; Uploaded Mesh convergence test and plots
Crazy-Rich-Meghan b4fca3c
Update README.md
Crazy-Rich-Meghan e589cbb
Clean up
Crazy-Rich-Meghan 9cf4af5
Update Setup in README.md
Crazy-Rich-Meghan 87d9fcc
Merge branch 'develop' into perpendicular-flap-gismo-elasticity-stress
Crazy-Rich-Meghan 1eb6912
Recover modified file by mistake
Crazy-Rich-Meghan fe319e6
Update clean.sh
Crazy-Rich-Meghan 38115d6
Merge branch 'precice:develop' into perpendicular-flap-gismo-elastici…
Crazy-Rich-Meghan 766e928
Update README.md; added clean_gismo in tools.sh; update run and clean…
Crazy-Rich-Meghan c5184d5
Update perpendicular-flap-stress/README.md
Crazy-Rich-Meghan 4ae5359
Update file name
Crazy-Rich-Meghan afaace6
Delete image folder
uekerman 0a56df7
Extend and enable cleaning scripts
uekerman f4a2cc7
Fix preCICE and adapter config
uekerman 4fd0a47
Add plotting script
uekerman d8c6a29
Redo README
uekerman aa4a3cb
Rename gismo subfolder and delete cpp
uekerman 40c0464
Really delete cpp
uekerman c3d618e
Specify G#Smo solver
uekerman 1b1e757
Update Post-processing (plotting)
Crazy-Rich-Meghan a299b79
Added visualization for precice config; add tip-displacement
Crazy-Rich-Meghan c2ca3ea
Rename
Crazy-Rich-Meghan 920d38b
Update README.md
Crazy-Rich-Meghan de4c3a4
Update perpendicular-flap-stress/plot-displacement.sh
uekerman db412ca
Update perpendicular-flap-stress/README.md
uekerman 9b6ce23
Update perpendicular-flap-stress/README.md
uekerman 99592ad
Make gismo run script executable
uekerman 8b5c76f
Fixed the comparison with other solvers
Crazy-Rich-Meghan 827e84c
Remove unused image, re-order README
uekerman 410f97c
Merge branch 'develop' into perpendicular-flap-gismo-elasticity-stress
Crazy-Rich-Meghan a69bc8e
Update tools/cleaning-tools.sh
Crazy-Rich-Meghan 9439d1f
Update images
Crazy-Rich-Meghan aed9fb1
Update perpendicular-flap-stress/README.md
Crazy-Rich-Meghan bd0610f
Replace explicit clean tutorial script with link
uekerman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
title: Perpendicular flap with stresses | ||
permalink: tutorials-perpendicular-flap-stresses.html | ||
keywords: G+Smo, fluid-structure interaction, FSI, OpenFOAM | ||
summary: This tutorial is a modified version of the “perpendicular flap” tutorial using stresses instead of forces. | ||
--- | ||
|
||
{% note %} | ||
Get the [case files of this tutorial](https://github.com/precice/tutorials/tree/master/perpendicular-flap-stresses). Read how in the [tutorials introduction](https://precice.org/tutorials.html). | ||
{% endnote %} | ||
|
||
## Setup | ||
|
||
The scenario is exactly the same as the one described in the [perpendicular flap tutorial](https://precice.org/tutorials-perpendicular-flap.html). The only difference is that we use stresses instead of forces as data sent from the fluid to the solid participant. This requires changing the mapping constraint from conservative (forces) to consistent (stresses). To avoid a "write-consistent" combination, which [cannot be used in parallel](ttps://precice.org/configuration-mapping.html#restrictions-for-parallel-participants), we exchange both meshes. | ||
|
||
## Configuration | ||
|
||
preCICE configuration (image generated using the [precice-config-visualizer](https://precice.org/tooling-config-visualization.html)): | ||
|
||
 | ||
|
||
## Available solvers | ||
|
||
Fluid participant: | ||
|
||
* OpenFOAM (pimpleFoam). In case you are using a very old OpenFOAM version, you will need to adjust the solver to `pimpleDyMFoam` in the `Fluid/system/controlDict` file. For more information, have a look at the [OpenFOAM adapter documentation](https://precice.org/adapter-openfoam-overview.html). | ||
|
||
Solid participant: | ||
|
||
* G+Smo (perpendicular-flap-vertex-gismo). This solver includes both linear and nonlinear versions of the Newmark time integrator for time-dependent structural problems. The linear version iterates using a constant stiffness matrix. The nonlinear version iterates using an updated Jacobian matrix to account for material or geometric nonlinearity. By default, the solver runs in linear mode. To switch to nonlinear mode, add `--nonlinear` as option in `run.sh`. For more information, have a look at the [G+Smo adapter documentation](https://precice.org/adapter-gismo-overview.html). | ||
|
||
## Running the simulation | ||
|
||
Open two separate terminals and start the desired fluid and solid participants by calling the respective run scripts `run.sh` located in the participants' directories. For example: | ||
|
||
```bash | ||
cd fluid-openfoam | ||
./run.sh | ||
``` | ||
|
||
and | ||
|
||
```bash | ||
cd solid-gismo | ||
./run.sh | ||
``` | ||
uekerman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Post-processing | ||
|
||
On the OpenFOAM side, you can open the `.foam` file with ParaView, or create VTK files with `foamToVTK`. | ||
|
||
On the G+Smo side, you can open the `.pvd` file located in the `solid-gismo/output` folder using ParaView. If you prefer not to plot the simulation, simply edit the `run.sh` script and remove the `--plot` option. | ||
|
||
As we defined a watchpoint on the 'Solid' participant at the flap tip (see `precice-config.xml`), we can plot it with gnuplot using the script `plot-displacement.sh.` You need to specify the directory of the selected solid participant as a command line argument, so that the script can pick-up the desired watchpoint file, e.g. `plot-displacement.sh solid-gismo`. The resulting graph shows the x displacement of the flap tip. You can modify the script to plot the force instead. | ||
|
||
 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think, we don't need to show all other variants here. One non-linear one (e.g. deal.II) could be enough. |
||
|
||
{% 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. | ||
{% enddisclaimer %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../tools/clean-tutorial-base.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FoamFile | ||
{ | ||
version 2.0; | ||
format ascii; | ||
class volVectorField; | ||
object U; | ||
} | ||
|
||
dimensions [0 1 -1 0 0 0 0]; | ||
|
||
internalField uniform (10 0 0); | ||
|
||
boundaryField | ||
{ | ||
inlet | ||
{ | ||
type fixedValue; | ||
value $internalField; | ||
} | ||
outlet | ||
{ | ||
type zeroGradient; | ||
} | ||
flap | ||
{ | ||
type movingWallVelocity; | ||
value uniform (0 0 0); | ||
} | ||
upperWall | ||
{ | ||
type noSlip; | ||
} | ||
lowerWall | ||
{ | ||
type noSlip; | ||
} | ||
frontAndBack | ||
{ | ||
type empty; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
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; | ||
} | ||
|
||
flap | ||
{ | ||
type zeroGradient; | ||
} | ||
|
||
upperWall | ||
{ | ||
type zeroGradient; | ||
} | ||
|
||
lowerWall | ||
{ | ||
type zeroGradient; | ||
} | ||
|
||
frontAndBack | ||
{ | ||
type empty; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
FoamFile | ||
{ | ||
version 2.0; | ||
format ascii; | ||
class surfaceScalarField; | ||
object phi; | ||
} | ||
|
||
dimensions [0 3 -1 0 0 0 0]; | ||
|
||
internalField uniform 0; | ||
boundaryField | ||
{ | ||
inlet | ||
{ | ||
type calculated; | ||
value $internalField; | ||
} | ||
outlet | ||
{ | ||
type calculated; | ||
value $internalField; | ||
} | ||
flap | ||
{ | ||
type calculated; | ||
value uniform 0; | ||
} | ||
upperWall | ||
{ | ||
type calculated; | ||
value uniform 0; | ||
} | ||
lowerWall | ||
{ | ||
type calculated; | ||
value uniform 0; | ||
} | ||
frontAndBack | ||
{ | ||
type empty; | ||
value nonuniform 0; | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
perpendicular-flap-stress/fluid-openfoam/0/pointDisplacement
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
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); | ||
} | ||
|
||
flap | ||
{ | ||
type fixedValue; | ||
value $internalField; | ||
} | ||
|
||
upperWall | ||
{ | ||
type slip; | ||
} | ||
|
||
lowerWall | ||
{ | ||
type slip; | ||
} | ||
|
||
frontAndBack | ||
{ | ||
type empty; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env sh | ||
set -e -u | ||
|
||
. ../../tools/cleaning-tools.sh | ||
|
||
clean_openfoam . |
18 changes: 18 additions & 0 deletions
18
perpendicular-flap-stress/fluid-openfoam/constant/dynamicMeshDict
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FoamFile | ||
{ | ||
version 2.0; | ||
format ascii; | ||
class dictionary; | ||
object dynamicMeshDict; | ||
} | ||
|
||
dynamicFvMesh dynamicMotionSolverFvMesh; | ||
|
||
motionSolverLibs ("libfvMotionSolvers.so"); | ||
|
||
solver displacementLaplacian; | ||
// OpenFOAM9 or newer: rename "solver" to "motionSolver" | ||
|
||
displacementLaplacianCoeffs { | ||
diffusivity quadratic inverseDistance (flap); | ||
} |
11 changes: 11 additions & 0 deletions
11
perpendicular-flap-stress/fluid-openfoam/constant/transportProperties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FoamFile | ||
{ | ||
version 2.0; | ||
format ascii; | ||
class dictionary; | ||
object transportProperties; | ||
} | ||
|
||
transportModel Newtonian; | ||
|
||
nu nu [ 0 2 -1 0 0 0 0 ] 1; |
9 changes: 9 additions & 0 deletions
9
perpendicular-flap-stress/fluid-openfoam/constant/turbulenceProperties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FoamFile | ||
{ | ||
version 2.0; | ||
format ascii; | ||
class dictionary; | ||
object turbulenceProperties; | ||
} | ||
|
||
simulationType laminar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
set -e -u | ||
|
||
. ../../tools/log.sh | ||
exec > >(tee --append "$LOGFILE") 2>&1 | ||
|
||
blockMesh | ||
|
||
../../tools/run-openfoam.sh "$@" | ||
. ../../tools/openfoam-remove-empty-dirs.sh && openfoam_remove_empty_dirs | ||
|
||
close_log |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to run this, I get, in the beginning, on the Fluid:
and the Solid waits with:
Am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Makis,
Thanks for testing! I tested this PR with a clean clone. I did not run into this problem.
My procedure is:
I am able to run this example following these steps and I could not replicate the issue here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried again, after pulling the latest state of this branch and of Gismo:
perpendicular-flap-gismo-elasticity-stress
Mar 24 (bd0610f)stable
Mar 23 (390eaf68de077ecddb5ae9f899fa88bf8a84a244)develop
Mar 21 (6c1b8590c1895502443901f73bdde71a53d776f2) withPRECICE_FEATURE_PETSC_MAPPING ON
andPRECICE_FEATURE_GINKGO_MAPPING OFF
develop
Mar 21 (fc16b305bd43f455b9ce044acadd42c56b52fdf4)Same error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Crazy-Rich-Meghan which state of preCICE are you using? I can try checking with that, to exclude any bugs in preCICE
develop
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It worked for me previously, but I am now trying to mimic @MakisH 's setup.
I, however, get an error when trying to build that version of gismo:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hverhelst Thanks for the quick reaction. I wasn't aware that this is necessary. I now used a fresh clone again.
And indeed I also run into the same problem as @MakisH
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, that's somehow good. I think @Crazy-Rich-Meghan is on it right now. I'll wait for her response.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get a similar problem with preCICE v3.1.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Visualizing the coupling mesh of G+Smo looks strange. I get a volume mesh, not a surface mesh. The tip of the flap:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And it is a 3D mesh, so duplicated vertices for a mapping in 2D, which explains the error.
@hverhelst Did you change anything in the adapter in this direction recently?