I am trying to use Elmer to simulate an piezoelectical element for optimization in an sensor application. Using StressSolver for mechanical displacement and StatElecSolver to calculate the generated charge.
In this forum I saw there is a feature ”Run Control”.
I'd tried to sqeeze in sequence a cube in direction of 3 axis (colums in picture) two times (rows).
Code: Select all
Check Keywords "Warn"
!echo on
Header
Mesh DB "." "Wuerfel_1cm3"
Results Directory "result_RunContr_3AchsF2zero_mult"
End
Run Control
Max Output Level = 10
! When we fetch the parameters we will automatically have variable a MATC vector "rpar"
! with the given number of parameters. You can refer to these as "$rpar(i)", i=0,1,2...
Run Control Iterations = 6 !Integer 4
Parameter Count = Integer 11 ! columns in matrix
! Target Boundaries = 1 XZ- Ebene in VTK Viewer
! Target Boundaries = 2 YZ+ Ebene
! Target Boundaries = 3 XZ+ Ebene
! Target Boundaries = 4 YZ- Ebene
! Target Boundaries = 5 XY- Ebene
! Target Boundaries = 6 XY+ Ebene
!rpar columns reference
! 1 2 3 4 5 6 Boundarie Condition to Boundarie
! 1 2 3 force in direction
! x forcedirection
! x Iterationcount
Parameter Array(6,11) = Real 1 3 2 4 5 6 0 -10 0 2 1 \
4 2 1 3 5 6 -10 0 0 1 1 \
5 6 1 2 3 4 0 0 -10 3 1 \
1 3 2 4 5 6 0 -10 0 2 2 \
4 2 1 3 5 6 -10 0 0 1 2 \
5 6 1 2 3 4 0 0 -10 3 2
! Parameter File = File "par.dat"
! Parameter Row Offset = Integer 2 ! starts from line 3, doing lines 3-6
End
Constants
End
Simulation
Coordinate System = Cartesian 3D
Simulation Type = Steady State
Steady State Max Iterations = 3
Steady State Min Iterations = 1
End
Body 1
Equation = 1
Material = 1
Body Force = 1
End
Body Force 1
End
Equation 1
Active Solvers(2) = 1 2
End
Solver 1
Equation = Stress Analysis
Variable = Displacement
Variable DOFs = 3
Linear System Solver = Iterative
Linear System Direct Method = UMFPack
Linear System Iterative Method = BiCGStab
Linear System Preconditioning = ILU1
Linear System Max Iterations = 500
Linear System Convergence Tolerance = 1.0e-8
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Newton After Iterations = 20
Nonlinear System Max Iterations = 1
Nonlinear System Convergence Tolerance = 1.0e-5
Nonlinear System Relaxation Factor = 1.0
Steady State Convergence Tolerance = 1.0e-4
End
Solver 2
Exec Solver = after all
Equation = "result output"
Procedure = "ResultOutputSolve" "ResultOutputSolver"
Output File Name = fix_in_$rpar(0)$_3AchsF2zero_on_$rpar(1)$_dir_$rpar(9)$_iter_$rpar(10)
Vtu Format = Logical True
Vector Field 1 = String Displacement
End
Material 1
Density = 2648 ! [kg/m3]
Youngs Modulus = 89e9 ! [Pa = N/(m^2)]
Poisson Ratio = 0.122894
End
! Target Boundaries = 1 XZ- Ebene in VTK Viewer
! Target Boundaries = 2 YZ+ Ebene
! Target Boundaries = 3 XZ+ Ebene
! Target Boundaries = 4 YZ- Ebene
! Target Boundaries = 5 XY- Ebene
! Target Boundaries = 6 XY+ Ebene
Boundary Condition $rpar(0)
Target Boundaries = $rpar(0)
Displacement 1 = 0
Displacement 2 = 0
Displacement 3 = 0
End
Boundary Condition $rpar(1)
Target Boundaries = $rpar(1)
Force 1 = $rpar(6)
Force 2 = $rpar(7)
Force 3 = $rpar(8)
End
Boundary Condition $rpar(2)
Target Boundaries = $rpar(2)
End
Boundary Condition $rpar(3)
Target Boundaries = $rpar(3)
End
Boundary Condition $rpar(4)
Target Boundaries = $rpar(4)
End
Boundary Condition $rpar(5)
Target Boundaries = $rpar(5)
End
RUN
To me it seems that boundary conditions are not reseted at the begin off a new control loop iteration.
Is there a posibility to enforce this? And are other side effects to account?
Thank You for any input in advance.
Dirk
For reference.
Run Control: new outer loop do optimization, scanning etc.
Command-line parameters usable in sif file