Non-conformal mesh contacts

Numerical methods and mathematical models of Elmer
Tapegoji
Posts: 28
Joined: 12 May 2024, 00:22
Antispam: Yes

Non-conformal mesh contacts

Post by Tapegoji »

Hi,
I am doing a static current conduction in Elmer. I have a pcb file that has a pad on top. I apply a 5 V to the pad and 1 A to another pad and the same net. However, it seems that there is no contact between the pad and the surface. as shown in the image below. I am looking at potential and it seems not correct.

Code: Select all

Header
  CHECK KEYWORDS "Warn"
  Mesh DB "." "."
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
  Output File = case.result
  Coordinate Scaling = 0.001
End

Constants
  Permeability of Vacuum = 1.25663706e-06
  Permittivity of Vacuum = 8.854187817e-12
End

! copper_eq
Equation 1
  Active Solvers(1) = 1   ! StaticCurrentConduction, 
End


! StaticCurrentConduction
Solver 1
  Equation = Static Current Conduction
  Procedure = "StatCurrentSolve" "StatCurrentSolver"
  Calculate Volume Current = True
  Variable = Potential
  Exec Solver = Always
  Stabilize = True
  Optimize Bandwidth = True
  Steady State Convergence Tolerance = 1e-05
  Nonlinear System Convergence Tolerance = 1e-07
  Nonlinear System Max Iterations = 20
  Nonlinear System Newton After Iterations = 3
  Nonlinear System Newton After Tolerance = 0.001
  Nonlinear System Relaxation Factor = 1
  Linear System Solver = Iterative
  Linear System Iterative Method = BiCGStab
  Linear System Max Iterations = 500
  Linear System Convergence Tolerance = 1e-10
  BiCGstabl polynomial degree = 2
  Linear System Preconditioning = ILU0
  Linear System ILUT Tolerance = 0.001
  Linear System Abort Not Converged = False
  Linear System Residual Output = 10
  Linear System Precondition Recompute = 1
  Calculate Joule Heating = True
End


! copper
Material 1
  Density = 8960.0
  Electric Conductivity = 32300000
  Emissivity = 0.012
  Heat Capacity = 415.0
  Heat Conductivity = 401.0
  Relative Permeability = 1
  Relative Permittivity = 1
End


! copper
Body 1
  Target Bodies(1) = 11
  Equation = 1  ! copper_eq
  Material = 1  ! copper
End


! pos
Boundary Condition 1
  Target Boundaries(1) = 1
  Name = "VoltageP"
  Potential = 5
End

! neg
Boundary Condition 2
  Target Boundaries(1) = 9
  Name = "Current_out"
  Electric Current Density = -distribute 1
End


Attachments
temp.png
(26.69 KiB) Not downloaded yet
kevinarden
Posts: 2418
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Non-conformal mesh contacts

Post by kevinarden »

Then data will not be shared since Elmer shares data through the nodes. A conforming mesh isn't absolutely required but you can use mortar conditions to join the two boundaries. If there are coincident nodes causing the break the the nodes can be merged in Salome or ElmerGrid

ElmerGrid 8 2 my.unv -autoclean -merge 1.e-5

or if the mesh is already created

ElmerGrid 2 2 mesh -o mergedmesh - merge 1.e-5

if the nodes can't be merged then you will have to setup mortar BCs to force the body to share data.
Tapegoji
Posts: 28
Joined: 12 May 2024, 00:22
Antispam: Yes

Re: Non-conformal mesh contacts

Post by Tapegoji »

There is not any coincident nodes. They can't be merged.
Here is my attempt at making the mortar BC work. but the result is still the same
I have attached the project in the zip file.

https://drive.google.com/file/d/1k5YdA5 ... p=sharing

Code: Select all

Header
  CHECK KEYWORDS "Warn"
  Mesh DB "." "."
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
  Output File = case.result
  Coordinate Scaling = 0.001
End

Constants
  Permeability of Vacuum = 1.25663706e-06
  Permittivity of Vacuum = 8.854187817e-12
End

! copper_eq
Equation 1
  Active Solvers(1) = 1   ! StaticCurrentConduction, 
End


! StaticCurrentConduction
Solver 1
  Equation = Static Current Conduction
  Procedure = "StatCurrentSolve" "StatCurrentSolver"
  Calculate Joule Heating = True
  Variable = Potential
  Calculate Volume Current = True
  Exec Solver = Always
  Stabilize = True
  Optimize Bandwidth = True
  Steady State Convergence Tolerance = 1e-05
  Nonlinear System Convergence Tolerance = 1e-07
  Nonlinear System Max Iterations = 20
  Nonlinear System Newton After Iterations = 3
  Nonlinear System Newton After Tolerance = 0.001
  Nonlinear System Relaxation Factor = 1
  Linear System Solver = Direct
  Linear System Direct Method = MUMPS
  Apply Mortar BCs = Logical True
End


! copper
Material 1
  Density = 8960.0
  Electric Conductivity = 32300000
  Emissivity = 0.012
  Heat Capacity = 415.0
  Heat Conductivity = 401.0
  Relative Permeability = 1
  Relative Permittivity = 1
End


! copper
Body 1
  Target Bodies(1) = 11
  Equation = 1  ! copper_eq
  Material = 1  ! copper
End


! pos
Boundary Condition 1
  Target Boundaries(1) = 1
  Name = "VoltageP"
  Potential = 1
  Mortar BC = 3
End

! neg
Boundary Condition 2
  Target Boundaries(1) = 9
  Name = "Current_out"
  Electric Current Density = -distribute -1
  Mortar BC = 3
End

! share Boundary

Boundary Condition 3
  Target Boundaries(1) = 116
  Name = "Net top"
End

Tapegoji
Posts: 28
Joined: 12 May 2024, 00:22
Antispam: Yes

Re: Non-conformal mesh contacts

Post by Tapegoji »

In fact I tried all sort of options to merge the meshes but no sucess. It seems my mesh is not merging at all. Looking at the mesh in paraview after issuing the -merge command, shows that they are not merged. Any idea?
kevinarden
Posts: 2418
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Non-conformal mesh contacts

Post by kevinarden »

MAIN: Number of timesteps to be saved: 1
CalculateMeshPieces: Number of separate pieces in mesh is 13
ERROR:: CalculateMeshPieces: Number of pieces differ from the requested 1
STOP 1

You have 13 separate pieces

To check for a conforming mesh, add this statement to the simulation section of a sif:

Desired Mesh Pieces = 1

then running with your mesh, ElmerSolver reports an error and exits:

The step file is not included so it is difficult to check.
kevinarden
Posts: 2418
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Non-conformal mesh contacts

Post by kevinarden »

The outer edge seams to conform, but the inner edge does not
mesh.png
mesh.png (20.5 KiB) Viewed 477 times
kevinarden
Posts: 2418
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Non-conformal mesh contacts

Post by kevinarden »

On the mortar condition there needs to be BC surfaces at the interface. Loading the mesh into ElmerGUI there are only 10 boundary surfaces all on the top faces of the surface.
mortar.png
mortar.png (52.88 KiB) Viewed 473 times
I can't change this without the stp file.
Tapegoji
Posts: 28
Joined: 12 May 2024, 00:22
Antispam: Yes

Re: Non-conformal mesh contacts

Post by Tapegoji »

Hi Kevin,

Yes, you are right. the to surface is the contact. that I am applying voltage to. I will fix that.

I am adding the step file here.
Attachments
case.zip
(59.03 KiB) Downloaded 43 times
kevinarden
Posts: 2418
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Non-conformal mesh contacts

Post by kevinarden »

You can use Salome to import the stp file which comes in as one solid, but use the explode command to show that it is really 13 different solids (or bodies) in Elmer. The goal would be to merge these 13 into one sold to obtain a conforming mesh, Or use the 13 to define mortar conditions.
bodies.png
bodies.png (52.34 KiB) Viewed 454 times
kevinarden
Posts: 2418
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Non-conformal mesh contacts

Post by kevinarden »

conforming.png
conforming.png (20.68 KiB) Viewed 452 times
Solution with conforming mesh

compress.zip
(938.33 KiB) Downloaded 46 times
Post Reply