diff --git a/multiple-perpendicular-flaps/solid-left-dealii/linear_elasticity.prm b/multiple-perpendicular-flaps/solid-left-dealii/linear_elasticity.prm deleted file mode 100644 index 019f7f406..000000000 --- a/multiple-perpendicular-flaps/solid-left-dealii/linear_elasticity.prm +++ /dev/null @@ -1,71 +0,0 @@ -# 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/parameters.prm similarity index 62% rename from multiple-perpendicular-flaps/solid-left-dealii/nonlinear_elasticity.prm rename to multiple-perpendicular-flaps/solid-left-dealii/parameters.prm index cf1d4fdab..8c9bbd96e 100644 --- a/multiple-perpendicular-flaps/solid-left-dealii/nonlinear_elasticity.prm +++ b/multiple-perpendicular-flaps/solid-left-dealii/parameters.prm @@ -9,54 +9,51 @@ subsection Time # Time step size set Time step size = 0.01 - # Output interval - set Output interval = 10 + # Write results every x timesteps + 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 + set Poisson's ratio = 0.3 # Shear modulus - set Shear modulus = 153846 + set Shear modulus = 1538462 # Density - set rho = 3000 + 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 +subsection Solver + # Structural model to be used: linear or neo-Hookean + set Model = linear # Linear solver: CG or Direct set Solver type = Direct -end -subsection Nonlinear solver - # Number of Newton-Raphson iterations allowed + # Max CG solver iterations (multiples of the system matrix size) + # In 2D, this value is best set at 2. In 3D, a value of 1 works fine. + set Max iteration multiplier = 1 + + # Relative drop criterion for CG solver residual (multiplied by residual norm, ignored if Model == linear or solver == direct) + # Hard-coded to absolute criterion of 1e-10 for the linear model. + set Residual = 1e-6 + + # Number of Newton-Raphson iterations allowed (ignored if Model == linear) set Max iterations Newton-Raphson = 10 - # Displacement error tolerance + # Relative displacement error tolerance for non-linear iteration (ignored if Model == linear) set Tolerance displacement = 1.0e-6 - # Force residual tolerance + # Relative force residual tolerance for non-linear iteration (ignored if Model == linear) set Tolerance force = 1.0e-9 end diff --git a/multiple-perpendicular-flaps/solid-left-dealii/run.sh b/multiple-perpendicular-flaps/solid-left-dealii/run.sh index 57978366e..03c71ca0f 100755 --- a/multiple-perpendicular-flaps/solid-left-dealii/run.sh +++ b/multiple-perpendicular-flaps/solid-left-dealii/run.sh @@ -1,27 +1,30 @@ #!/bin/bash cd ${0%/*} || exit 1 # Run from this directory -# Solid1 participant +# Solid 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. +# in another terminal. +# These scripts present how the two participants would be started manually. -# 1 for true, 0 for false -nonlinear=0 -if [ "$1" = "-nonlinear" ]; then - nonlinear=1 -fi +for i in "$@" +do +case $i in + -p=*|--prefix=*) + SEARCHPATH="${i#*=}" + shift # past argument=value + ;; + *) + # unknown option + ;; +esac +done -linear=0 -if [ "$1" = "-linear" ]; then - linear=1 +if test -f "elasticity"; then + ./elasticity parameters.prm + elif [ ! -z ${SEARCHPATH} ]; then + ${SEARCHPATH}/elasticity parameters.prm + else + echo "Unable to find the executable 'elasticity'. Either specify a prefix (-p=/path/to/elasticity) or make it discoverable at runtime (e.g. export PATH)" 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/multiple-perpendicular-flaps/solid-right-dealii/linear_elasticity.prm b/multiple-perpendicular-flaps/solid-right-dealii/linear_elasticity.prm deleted file mode 100644 index e5cab3f73..000000000 --- a/multiple-perpendicular-flaps/solid-right-dealii/linear_elasticity.prm +++ /dev/null @@ -1,71 +0,0 @@ -# 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/parameters.prm similarity index 62% rename from multiple-perpendicular-flaps/solid-right-dealii/nonlinear_elasticity.prm rename to multiple-perpendicular-flaps/solid-right-dealii/parameters.prm index f0f1289ee..5845d12c5 100644 --- a/multiple-perpendicular-flaps/solid-right-dealii/nonlinear_elasticity.prm +++ b/multiple-perpendicular-flaps/solid-right-dealii/parameters.prm @@ -9,54 +9,51 @@ subsection Time # Time step size set Time step size = 0.01 - # Output interval - set Output interval = 10 + # Write results every x timesteps + 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 + set Poisson's ratio = 0.3 # Shear modulus - set Shear modulus = 153846 + set Shear modulus = 1538462 # Density - set rho = 3000 + 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 +subsection Solver + # Structural model to be used: linear or neo-Hookean + set Model = linear # Linear solver: CG or Direct set Solver type = Direct -end -subsection Nonlinear solver - # Number of Newton-Raphson iterations allowed + # Max CG solver iterations (multiples of the system matrix size) + # In 2D, this value is best set at 2. In 3D, a value of 1 works fine. + set Max iteration multiplier = 1 + + # Relative drop criterion for CG solver residual (multiplied by residual norm, ignored if Model == linear or solver == direct) + # Hard-coded to absolute criterion of 1e-10 for the linear model. + set Residual = 1e-6 + + # Number of Newton-Raphson iterations allowed (ignored if Model == linear) set Max iterations Newton-Raphson = 10 - # Displacement error tolerance + # Relative displacement error tolerance for non-linear iteration (ignored if Model == linear) set Tolerance displacement = 1.0e-6 - # Force residual tolerance + # Relative force residual tolerance for non-linear iteration (ignored if Model == linear) set Tolerance force = 1.0e-9 end diff --git a/multiple-perpendicular-flaps/solid-right-dealii/run.sh b/multiple-perpendicular-flaps/solid-right-dealii/run.sh index c85f04d60..03c71ca0f 100755 --- a/multiple-perpendicular-flaps/solid-right-dealii/run.sh +++ b/multiple-perpendicular-flaps/solid-right-dealii/run.sh @@ -1,27 +1,30 @@ #!/bin/bash cd ${0%/*} || exit 1 # Run from this directory -# Solid2 participant +# Solid 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. +# in another terminal. +# These scripts present how the two participants would be started manually. -# 1 for true, 0 for false -nonlinear=0 -if [ "$1" = "-nonlinear" ]; then - nonlinear=1 -fi +for i in "$@" +do +case $i in + -p=*|--prefix=*) + SEARCHPATH="${i#*=}" + shift # past argument=value + ;; + *) + # unknown option + ;; +esac +done -linear=0 -if [ "$1" = "-linear" ]; then - linear=1 +if test -f "elasticity"; then + ./elasticity parameters.prm + elif [ ! -z ${SEARCHPATH} ]; then + ${SEARCHPATH}/elasticity parameters.prm + else + echo "Unable to find the executable 'elasticity'. Either specify a prefix (-p=/path/to/elasticity) or make it discoverable at runtime (e.g. export PATH)" 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/perpendicular-flap/solid-dealii/nonlinear_elasticity.prm b/perpendicular-flap/solid-dealii/nonlinear_elasticity.prm deleted file mode 100644 index cb760534e..000000000 --- a/perpendicular-flap/solid-dealii/nonlinear_elasticity.prm +++ /dev/null @@ -1,81 +0,0 @@ -# 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.3 - - # Shear modulus - set Shear modulus = 1538462 - - # 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 = Solid - - # Name of the coupling mesh in the precice-config.xml file - set Mesh name = Solid-Mesh - - # Name of the read data in the precice-config.xml file - set Read data name = Force - - # Name of the write data in the precice-config.xml file - set Write data name = Displacement -end diff --git a/perpendicular-flap/solid-dealii/linear_elasticity.prm b/perpendicular-flap/solid-dealii/parameters.prm similarity index 55% rename from perpendicular-flap/solid-dealii/linear_elasticity.prm rename to perpendicular-flap/solid-dealii/parameters.prm index 91b5bb05c..2dda02e2e 100644 --- a/perpendicular-flap/solid-dealii/linear_elasticity.prm +++ b/perpendicular-flap/solid-dealii/parameters.prm @@ -14,37 +14,47 @@ subsection Time 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 = 1538462 + # Poisson's ratio + set Poisson's ratio = 0.3 - # lambda - set lambda = 2307692 + # Shear modulus + set Shear modulus = 1538462 - # density + # Density set rho = 3000 - # body forces x,y,z + # 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) +subsection Solver + # Structural model to be used: linear or neo-Hookean + set Model = linear + + # Linear solver: CG or Direct + set Solver type = Direct + + # Max CG solver iterations (multiples of the system matrix size) + # In 2D, this value is best set at 2. In 3D, a value of 1 works fine. set Max iteration multiplier = 1 - # Linear solver residual (scaled by residual norm) + # Relative drop criterion for CG solver residual (multiplied by residual norm, ignored if Model == linear or solver == direct) + # Hard-coded to absolute criterion of 1e-10 for the linear model. set Residual = 1e-6 - # Linear solver: CG or Direct - set Solver type = Direct + # Number of Newton-Raphson iterations allowed (ignored if Model == linear) + set Max iterations Newton-Raphson = 10 + + # Relative displacement error tolerance for non-linear iteration (ignored if Model == linear) + set Tolerance displacement = 1.0e-6 + + # Relative force residual tolerance for non-linear iteration (ignored if Model == linear) + set Tolerance force = 1.0e-9 end subsection precice configuration diff --git a/perpendicular-flap/solid-dealii/run.sh b/perpendicular-flap/solid-dealii/run.sh index 7eb9e4d94..03c71ca0f 100755 --- a/perpendicular-flap/solid-dealii/run.sh +++ b/perpendicular-flap/solid-dealii/run.sh @@ -7,21 +7,24 @@ cd ${0%/*} || exit 1 # Run from this directory # in another terminal. # These scripts present how the two participants would be started manually. -# 1 for true, 0 for false -nonlinear=0 -if [ "$1" = "-nonlinear" ]; then - nonlinear=1 -fi +for i in "$@" +do +case $i in + -p=*|--prefix=*) + SEARCHPATH="${i#*=}" + shift # past argument=value + ;; + *) + # unknown option + ;; +esac +done -linear=0 -if [ "$1" = "-linear" ]; then - linear=1 +if test -f "elasticity"; then + ./elasticity parameters.prm + elif [ ! -z ${SEARCHPATH} ]; then + ${SEARCHPATH}/elasticity parameters.prm + else + echo "Unable to find the executable 'elasticity'. Either specify a prefix (-p=/path/to/elasticity) or make it discoverable at runtime (e.g. export PATH)" 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/turek-hron-fsi3/solid-dealii/nonlinear_elasticity.prm b/turek-hron-fsi3/solid-dealii/parameters.prm similarity index 63% rename from turek-hron-fsi3/solid-dealii/nonlinear_elasticity.prm rename to turek-hron-fsi3/solid-dealii/parameters.prm index 00167df21..62625fd22 100644 --- a/turek-hron-fsi3/solid-dealii/nonlinear_elasticity.prm +++ b/turek-hron-fsi3/solid-dealii/parameters.prm @@ -9,17 +9,11 @@ subsection Time # Time step size set Time step size = 0.001 - # Output interval - set Output interval = 100 + # Write results every x timesteps + set Output interval = 100 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 @@ -32,31 +26,34 @@ subsection System properties set Shear modulus = 2.0e6 # Density - set rho = 1000 + set rho = 1000 # 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 +subsection Solver + # Structural model to be used: linear or neo-Hookean + set Model = neo-Hookean # Linear solver: CG or Direct set Solver type = Direct -end -subsection Nonlinear solver - # Number of Newton-Raphson iterations allowed + # Max CG solver iterations (multiples of the system matrix size) + # In 2D, this value is best set at 2. In 3D, a value of 1 works fine. + set Max iteration multiplier = 1 + + # Relative drop criterion for CG solver residual (multiplied by residual norm, ignored if Model == linear or solver == direct) + # Hard-coded to absolute criterion of 1e-10 for the linear model. + set Residual = 1e-6 + + # Number of Newton-Raphson iterations allowed (ignored if Model == linear) set Max iterations Newton-Raphson = 10 - # Displacement error tolerance + # Relative displacement error tolerance for non-linear iteration (ignored if Model == linear) set Tolerance displacement = 1.0e-6 - # Force residual tolerance + # Relative force residual tolerance for non-linear iteration (ignored if Model == linear) set Tolerance force = 1.0e-9 end diff --git a/turek-hron-fsi3/solid-dealii/run.sh b/turek-hron-fsi3/solid-dealii/run.sh index 7626688c9..03c71ca0f 100755 --- a/turek-hron-fsi3/solid-dealii/run.sh +++ b/turek-hron-fsi3/solid-dealii/run.sh @@ -7,4 +7,24 @@ cd ${0%/*} || exit 1 # Run from this directory # in another terminal. # These scripts present how the two participants would be started manually. -./nonlinear_elasticity nonlinear_elasticity.prm +for i in "$@" +do +case $i in + -p=*|--prefix=*) + SEARCHPATH="${i#*=}" + shift # past argument=value + ;; + *) + # unknown option + ;; +esac +done + +if test -f "elasticity"; then + ./elasticity parameters.prm + elif [ ! -z ${SEARCHPATH} ]; then + ${SEARCHPATH}/elasticity parameters.prm + else + echo "Unable to find the executable 'elasticity'. Either specify a prefix (-p=/path/to/elasticity) or make it discoverable at runtime (e.g. export PATH)" +fi +