Electrostatic potential of a cube of steel

The graphical user interface of Elmer
Post Reply
NewElmerUser
Posts: 7
Joined: 06 Feb 2019, 11:03
Antispam: Yes

Electrostatic potential of a cube of steel

Post by NewElmerUser » 06 Feb 2019, 16:32

I'm trying to solve a simple problem to make practice with this software.
I created a cube and I meshed it in gmsh. After that I imported the mesh in ElmerGUI and I did this steps in this order:
Cattura1.PNG
Cattura1.PNG (31.19 KiB) Viewed 342 times
Cattura2.PNG
Cattura2.PNG (37.3 KiB) Viewed 342 times
Cattura3.PNG
Cattura3.PNG (35.24 KiB) Viewed 342 times
The solver return to me:

Code: Select all

ELMER SOLVER (v 8.3) STARTED AT: 2019/02/06 14:25:16
ParCommInit:  Initialize #PEs:            1
MAIN: 
MAIN: =============================================================
MAIN: ElmerSolver finite element software, Welcome!
MAIN: This program is free software licensed under (L)GPL
MAIN: Copyright 1st April 1995 - , CSC - IT Center for Science Ltd.
MAIN: Webpage http://www.csc.fi/elmer, Email elmeradm@csc.fi
MAIN: Version: 8.3 (Rev: 432ee0dd, Compiled: 2018-12-18)
MAIN:  Running one task without MPI parallelization.
MAIN:  Running with just one thread per task.
MAIN:  Lua interpreted linked in.
MAIN: =============================================================

MAIN: 
MAIN: 
MAIN: -------------------------------------
MAIN: Reading Model: case.sif
LoadInputFile: Scanning input file: case.sif

LoadInputFile: Loading input file: case.sif
Loading user function library: [StatElecSolve]...[StatElecSolver_Init0]
LoadMesh: Base mesh name: ./.
LoadMesh: Elapsed REAL time:     0.0410 (s)
MAIN: -------------------------------------
AddVtuOutputSolverHack: Adding ResultOutputSolver to write VTU output in file: case
Loading user function library: [StatElecSolve]...[StatElecSolver_Init]
Loading user function library: [StatElecSolve]...[StatElecSolver_bulk]
Loading user function library: [StatElecSolve]...[StatElecSolver]
OptimizeBandwidth: ---------------------------------------------------------
OptimizeBandwidth: Computing matrix structure for: electrostatics...done.
OptimizeBandwidth: Half bandwidth without optimization: 1016
OptimizeBandwidth: 
OptimizeBandwidth: Bandwidth Optimization ...done.
OptimizeBandwidth: Half bandwidth after optimization: 240
OptimizeBandwidth: ---------------------------------------------------------
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver_Init]
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver_bulk]
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver]
MAIN: 
MAIN: -------------------------------------
MAIN:  Steady state iteration:            1
MAIN: -------------------------------------
MAIN: 
SingleSolver: Attempting to call solver
SingleSolver: Solver Equation string is: electrostatics
StatElecSolve: -------------------------------------
StatElecSolve: STATELEC SOLVER:
StatElecSolve: -------------------------------------
StatElecSolve: 
StatElecSolve: Electrostatic iteration: 1
StatElecSolve: Starting Assembly...
DefUtils::DefaultDirichletBCs: Setting Dirichlet boundary conditions
DefUtils::DefaultDirichletBCs: Dirichlet boundary conditions set
StatElecSolve:  Assembly (s)          :   4.2999999999999983E-002
SolveSystem: Solution trivially zero!
StatElecSolve:  Solve (s)             :   0.0000000000000000
StatElecSolve:  Result Norm   :    0.0000000000000000
StatElecSolve:  Relative Change :    0.0000000000000000
StatElecSolve: 
Loading user function library: [StatElecSolve]...[StatElecSolver_post]
ComputeChange: SS (ITER=1) (NRM,RELC): (  0.0000000      0.0000000     ) :: electrostatics
SingleSolver: Attempting to call solver
SingleSolver: Solver Equation string is: internalvtuoutputsolver
ResultOutputSolver: -------------------------------------
ResultOutputSolve: Saving with prefix: case
ResultOutputSolver: Creating list for saving - if not present
CreateListForSaving: Field Variables for Saving
ResultOutputSolver: Saving in unstructured VTK XML (.vtu) format
VtuOutputSolver: Saving results in VTK XML format with prefix: case
VtuOutputSolver: Saving number of partitions: 1
ResultOutputSolver: -------------------------------------
Loading user function library: [ResultOutputSolve]...[ResultOutputSolver_post]
ElmerSolver: *** Elmer Solver: ALL DONE ***
ElmerSolver: The end
SOLVER TOTAL TIME(CPU,REAL):         0.27        0.27
ELMER SOLVER FINISHED AT: 2019/02/06 14:25:16
It seems that all is ok.
Now I would like to see the potential in 3D space, but when I click on ElmerPost nothing happens, because it replies: 'No ElmerPost input file found'.
Should I generate such a file or am I missing some parameters before the solving process?

Thanks.

mzenker
Posts: 1902
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Electrostatic potential of a cube of steel

Post by mzenker » 06 Feb 2019, 17:08

Hi,

it is often useful to post the case.sif file which is in your project directory. That file is written by ElmerGUI and read by ElmerSolver. It contains the actual settings.
I would guess that in your case you need to start ParaView by hand (if not already installed, install it) and open the file case.vtu which I would expect to be in your project directory.

HTH,
Matthias

NewElmerUser
Posts: 7
Joined: 06 Feb 2019, 11:03
Antispam: Yes

Re: Electrostatic potential of a cube of steel

Post by NewElmerUser » 06 Feb 2019, 17:12

This is the .sif file:

Code: Select all

Header
  CHECK KEYWORDS Warn
  Mesh DB "." "."
  Include Path ""
  Results Directory ""
End

Simulation
  Max Output Level = 5
  Coordinate System = Cartesian
  Coordinate Mapping(3) = 1 2 3
  Simulation Type = Steady state
  Steady State Max Iterations = 1
  Output Intervals = 1
  Timestepping Method = BDF
  BDF Order = 1
  Solver Input File = case.sif
  Post File = case.vtu
End

Constants
  Gravity(4) = 0 -1 0 9.82
  Stefan Boltzmann = 5.67e-08
  Permittivity of Vacuum = 8.8542e-12
  Boltzmann Constant = 1.3807e-23
  Unit Charge = 1.602e-19
End

Body 1
  Target Bodies(1) = 1
  Name = "Body 1"
  Equation = 1
  Material = 1
  Initial condition = 1
End

Solver 1
  Equation = Electrostatics
  Variable = Potential
  Procedure = "StatElecSolve" "StatElecSolver"
  Exec Solver = Always
  Stabilize = True
  Bubbles = False
  Lumped Mass Matrix = False
  Optimize Bandwidth = True
  Steady State Convergence Tolerance = 1.0e-5
  Nonlinear System Convergence Tolerance = 1.0e-7
  Nonlinear System Max Iterations = 20
  Nonlinear System Newton After Iterations = 3
  Nonlinear System Newton After Tolerance = 1.0e-3
  Nonlinear System Relaxation Factor = 1
  Linear System Solver = Iterative
  Linear System Iterative Method = BiCGStab
  Linear System Max Iterations = 500
  Linear System Convergence Tolerance = 1.0e-10
  BiCGstabl polynomial degree = 2
  Linear System Preconditioning = ILU0
  Linear System ILUT Tolerance = 1.0e-3
  Linear System Abort Not Converged = False
  Linear System Residual Output = 10
  Linear System Precondition Recompute = 1
End

Equation 1
  Name = "Equation 1"
  Active Solvers(1) = 1
End

Material 1
  Name = "Steel (alloy - generic)"
  Heat expansion Coefficient = 12.0e-6
  Heat Conductivity = 37.2
  Relative Permittivity = 1
  Sound speed = 5100.0
  Heat Capacity = 976.0
  Mesh Poisson ratio = 0.285
  Density = 7850.0
  Poisson ratio = 0.285
  Youngs modulus = 200.0e9
End

Initial Condition 1
  Name = "InitialCondition 1"
  Potential = 1
End
Regarding Paraview, I know that Elmer already has an internal tool for post-processing, ElmerPost I think. Is it right?

mzenker
Posts: 1902
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Electrostatic potential of a cube of steel

Post by mzenker » 06 Feb 2019, 17:19

Hi,

you need a boundary condition in order to get a valid result.
ElmerPost does still exist, but is no longer supported. Instead ParaView is the recommended postprocessor.
To use ElmerPost, you need to change the file extension of the post file in Model->setup to .ep.

More generally, to get started with Elmer I would propose that you have a look into the tutorials... ;)

HTH,
Matthias

NewElmerUser
Posts: 7
Joined: 06 Feb 2019, 11:03
Antispam: Yes

Re: Electrostatic potential of a cube of steel

Post by NewElmerUser » 07 Feb 2019, 17:58

Ok thank you.
I would like to ask you another thing to complete my test project.
What's the difference between 'initial condition' and 'boundary condition' if the problem is not time/space-varying (electrostatic)?
Inside the boundary conditions, I also see 'potential' and 'potential condition'. What's the difference between them?

Thank you very much.

mzenker
Posts: 1902
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Electrostatic potential of a cube of steel

Post by mzenker » 07 Feb 2019, 18:09

Hi,

for a steady state simulation, initial condition makes no sense a priori. However, AFAIK it is used as initial guess for the iteration.
For your second question and many others you might have, you should first have a look into the documentation. The most important are the Solver Manual (see chapter 8 for your question), the Models Manual, and the Tutorials for beginners.

HTH,
Matthias

Post Reply