-
-
Notifications
You must be signed in to change notification settings - Fork 122
two perpendicular flap case #110
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
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
a6a8c2a
draft two perpendicular flap case
7918ea8
Allclean Allrun adapted to two flaps
37fbf51
name changed to solid1_mesh
a73ab7f
README update and deal.ii binaris removed
c2cf407
minor changes
f77bd6d
name changed to Fluid1-mesh...
474de49
delted deal.ii binaries
43de70d
modified gitignore
3dc05af
minor changes
4b9a2ca
update nonlinear prm files
a3b3bb6
gitignore thingie
692478b
minor changes
46a618c
runSolid added
08d8bda
just trying
carme-hp 1e3c67e
first wiki draft
carme-hp 09a70da
wiki draft
carme-hp 79d4682
wiki
carme-hp f8c745b
minor changes
carme-hp 29f8335
working on the mesh
carme-hp 0a543ad
working with smaller velocity
carme-hp 84f98dc
png added
carme-hp 2e97303
more images
carme-hp 22d084a
images
carme-hp 5248112
images
carme-hp ea3d784
changes about dealii
carme-hp 397cce9
english corrections
carme-hp ba86d49
allclean removes precice-output folder
carme-hp cff6519
updated documentation
carme-hp 618b192
flap location given as double
carme-hp 5ac1473
wiki content moved to readme file
carme-hp d06d394
precice-config.xml formatted using new version
carme-hp 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 hidden or 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,15 @@ | ||
Fluid/* | ||
!Fluid/0.orig | ||
!Fluid/constant/dynamicMeshDict | ||
!Fluid/constant/transportProperties | ||
!Fluid/constant/turbulenceProperties | ||
!Fluid/system | ||
!Fluid/Fluid.foam | ||
*.vtk | ||
*.log | ||
config.dot | ||
config.png | ||
linear_elasticity1 | ||
linear_elasticity2 | ||
precice-run/ | ||
|
This file contains hidden or 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,62 @@ | ||
#!/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" | ||
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 | ||
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: Solid1 (deal.II) | ||
Participant2="Solid1" | ||
cd ./Solid1/dealii_output | ||
# Clean the case | ||
echo "Cleaning Solid1 case" | ||
rm -fv solution-*.vtk | ||
cd .. | ||
rm -fv solution-*.vtk | ||
cd .. | ||
|
||
rm -fv ${Participant2}.log | ||
|
||
# Participant 3: Solid2 (deal.II) | ||
Participant3="Solid2" | ||
cd ./Solid2/dealii_output | ||
# Clean the case | ||
echo "Cleaning Solid2 case" | ||
rm -fv solution-*.vtk | ||
cd .. | ||
rm -fv solution-*.vtk | ||
cd .. | ||
|
||
rm -fv ${Participant3}.log | ||
|
||
# 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!" | ||
#------------------------------------------------------------------------------ |
This file contains hidden or 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,120 @@ | ||
#!/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 script "runFluid" and start the Solid participants manually | ||
# 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 | ||
echo " Restoring 0/ from 0.orig/..." | ||
rm -rfv 0 | ||
cp -r 0.orig 0 | ||
cd .. | ||
|
||
echo " Preparing the mesh..." | ||
blockMesh -case ${Participant1} > ${Participant1}_blockMesh.log 2>&1 | ||
checkMesh -case ${Participant1} > ${Participant1}_checkMesh.log 2>&1 | ||
|
||
# get application information | ||
cd ${Participant1} | ||
Solver1=$(getApplication) # solver | ||
echo " ${Participant1} Solver: ${Solver1}." | ||
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} ${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: Solid1 =========================== | ||
Participant2="Solid1" | ||
Solver2="linear_elasticity1" | ||
|
||
# Run | ||
echo " Starting the ${Participant2} participant..." | ||
./runSolid1 -linear > ${Participant2}.log 2>&1 & | ||
PIDParticipant2=$! | ||
|
||
|
||
# =============== Participant 3: Solid2 =========================== | ||
Participant3="Solid2" | ||
Solver3="linear_elasticity2" | ||
|
||
# Run | ||
echo " Starting the ${Participant3} participant..." | ||
./runSolid2 -linear > ${Participant3}.log 2>&1 & | ||
PIDParticipant3=$! | ||
|
||
|
||
# =============== Wait for all the participants to finish ======= | ||
echo "Waiting for the participants to exit..., PIDs: ${PIDParticipant1}, ${PIDParticipant2}, ${PIDParticipant3}" | ||
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} | ||
kill ${PIDParticipant3} | ||
false | ||
fi | ||
done | ||
|
||
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." | ||
# Precaution | ||
kill ${PIDParticipant1} | ||
kill ${PIDParticipant2} | ||
carme-hp marked this conversation as resolved.
Show resolved
Hide resolved
|
||
kill ${PIDParticipant3} | ||
|
||
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." |
This file contains hidden or 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,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; | ||
} | ||
} | ||
|
||
|
||
// ************************************************************************* // |
This file contains hidden or 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,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; | ||
} | ||
} | ||
|
||
// ************************************************************************* // |
This file contains hidden or 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,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; | ||
} | ||
} | ||
|
||
|
||
// ************************************************************************* // |
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.
Uh oh!
There was an error while loading. Please reload this page.