Skip to content

Commit

Permalink
Merge pull request #23 from DavidSCN/examples
Browse files Browse the repository at this point in the history
Add an example case configuration
  • Loading branch information
davidscn authored Feb 8, 2021
2 parents c0920a0 + 0cf9740 commit 2613f41
Show file tree
Hide file tree
Showing 2 changed files with 207 additions and 0 deletions.
77 changes: 77 additions & 0 deletions examples/precice-config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0"?>
<precice-configuration>
<log>
<sink
filter="%Severity% > debug and %Rank% = 0"
format="---[precice] %ColorizedSeverity% %Message%"
enabled="true" />
</log>

<solver-interface dimensions="3">
<data:vector name="Stress" />
<data:vector name="Displacement" />

<mesh name="Fluid-Mesh-Nodes">
<use-data name="Displacement" />
</mesh>

<mesh name="Fluid-Mesh-Faces">
<use-data name="Stress" />
</mesh>

<mesh name="Solid-write">
<use-data name="Displacement" />
</mesh>

<mesh name="Solid-read">
<use-data name="Stress" />
</mesh>

<participant name="Fluid">
<use-mesh name="Solid-write" from="Solid" />
<use-mesh name="Fluid-Mesh-Nodes" provide="yes" />
<use-mesh name="Fluid-Mesh-Faces" provide="yes" />
<write-data name="Stress" mesh="Fluid-Mesh-Faces" />
<read-data name="Displacement" mesh="Fluid-Mesh-Nodes" />
<mapping:nearest-neighbor
direction="read"
from="Solid-write"
to="Fluid-Mesh-Nodes"
constraint="consistent" />
</participant>

<participant name="Solid">
<use-mesh name="Solid-write" provide="yes" />
<use-mesh name="Solid-read" provide="yes" />
<use-mesh name="Fluid-Mesh-Faces" from="Fluid" />
<write-data name="Displacement" mesh="Solid-write" />
<read-data name="Stress" mesh="Solid-read" />
<mapping:nearest-neighbor
direction="read"
from="Fluid-Mesh-Faces"
to="Solid-read"
constraint="consistent" />
</participant>

<m2n:sockets from="Fluid" to="Solid" exchange-directory=".." />

<coupling-scheme:serial-implicit>
<participants first="Fluid" second="Solid" />
<max-time-windows value="10" />
<time-window-size value="1e-4" />
<exchange data="Stress" mesh="Fluid-Mesh-Faces" from="Fluid" to="Solid" />
<exchange data="Displacement" mesh="Solid-write" from="Solid" to="Fluid" />
<max-iterations value="50" />
<relative-convergence-measure limit="1e-3" data="Stress" mesh="Fluid-Mesh-Faces" />
<relative-convergence-measure limit="1e-3" data="Displacement" mesh="Solid-write" />
<acceleration:IQN-ILS>
<data name="Displacement" mesh="Solid-write" />
<preconditioner type="residual-sum" />
<filter type="QR2" limit="1e-3" />
<initial-relaxation value="0.1" />
<max-used-iterations value="10" />
<time-windows-reused value="15" />
</acceleration:IQN-ILS>
</coupling-scheme:serial-implicit>
</solver-interface>
</precice-configuration>
130 changes: 130 additions & 0 deletions examples/tube3d.prm
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# Listing of Parameters
# ---------------------
subsection Finite element system
# Displacement system polynomial order
set Polynomial degree = 1

# Gauss quadrature order
set Quadrature order = 2
end

subsection Output
# At which time to write a vtu output file
set Output tick = 2e-4

# Output solution watchpoint
set Output solution = false

# Watchpoint in undeformed configuration to output unknown fields
set Output points = 0.6, 0.2, 0

# Output folder
set Output folder = dealii-output
end


subsection Geometry
# Dimension of the problem
set Dimension = 3

# Number of global refinements
set Global refinement = 3

# Testcase to compute
set Testcase = tube3d
end


subsection Linear solver
# Linear solver residual (scaled by residual norm)
set Residual = 1e-6

# Linear solver iterations (multiples of the system matrix size)
set Max iteration multiplier = 1

# Preconditioner type
set Preconditioner type = gmg

# Preconditioner relaxation value
set Preconditioner relaxation = 0.65

# Disable condition estimate
set Estimate condition number = false

# Number of CG iterations to estimate condition number
set Condition number CG iterations = 20

# Type of caching for matrix-free operator
set MF caching = scalar_referential

# Use Chebyshev smoother as coarse level solver
set MF Chebyshev coarse = true

# Accurately estimate eigenvalues for coarse level Chebyshev solver
set MF Chebyshev coarse accurate eigenvalues = true

# Number of CG iterations to estiamte condition number for Chebyshev smoother
set MF Chebyshev number CG iterations = 30
end


subsection Material properties
# Poisson's ratio
set Poisson's ratio = 0.3

# Shear modulus
set Shear modulus = 3e5

# Formulation of the energy function
set Formulation = 1

# Density
set Density = 1200
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

# Displacement update absolute tolerance
set Absolute tolerance displacement = 5e-15

# Force residual tolerance
set Tolerance force = 1.0e-9

# Force residual absolute tolerance
set Absolute tolerance force = 2e-9
end


subsection Time
# End time
set End time = 0.5

# Time step size
set Time step size = 1e-4
end

subsection precice configuration
# 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 Write mesh name = Solid-write

# Name of the coupling mesh in the precice-config.xml file
set Read mesh name = Solid-read

# Name of the read data in the precice-config.xml file
set Read data name = Stress

# Name of the write data in the precice-config.xml file
set Write data name = Displacement
end

0 comments on commit 2613f41

Please sign in to comment.