How to solve ERROR:: CreateDiscontMes

Numerical methods and mathematical models of Elmer
Post Reply
sheetu
Posts: 26
Joined: 30 Mar 2021, 06:55
Antispam: Yes

How to solve ERROR:: CreateDiscontMes

Post by sheetu »

Here is the solver log.

ELMER SOLVER (v 9.0) STARTED AT: 2021/05/09 23:05:44

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: 9.0 (Rev: Release, Compiled: 2021-01-22)
MAIN: Running one task without MPI parallelization.
MAIN: Running with just one thread per task.
MAIN: Lua interpreted linked in.
MAIN: =============================================================

LoadInputFile: Reading only "Run Control" section

MAIN:
MAIN:
MAIN: -------------------------------------
MAIN: Reading Model: case.sif

LoadInputFile: Scanning input file: case.sif
LoadInputFile: Scanning only size info
LoadInputFile: First time visiting
LoadInputFile: Reading base load of sif file

LoadInputFile: Loading input file: case.sif
LoadInputFile: Reading base load of sif file

LoadInputFile: Number of BCs: 2
LoadInputFile: Number of Body Forces: 1
LoadInputFile: Number of Initial Conditions: 0
LoadInputFile: Number of Materials: 6
LoadInputFile: Number of Equations: 1
LoadInputFile: Number of Solvers: 5
LoadInputFile: Number of Bodies: 32

ElmerAsciiMesh: Base mesh name: ./.

CreateDiscontMesh: Creating discontinuous boundaries

WARNING:: CreateDiscontMesh: Missing 2 parent elements in partition 0
ERROR:: CreateDiscontMesh: Alternative strategy requires all parent elements!

STOP 1



And here is the sif file.
Header
CHECK KEYWORDS Warn
Mesh DB "." "."
Include Path ""
Results Directory ""
! PMSM 2D Magneto-Static Simulation
! Parameters
$ w_m = 3000/60*2*pi
! [rad/s mech.] mechanical frequency

$ pp = 2
! number of polepairs

$ w_el = w_m*pp
! [rad/s el.] electrical frequency

$ B_PM = 1.17
! [T] remanent flux density

$ mu_PM = 1.06
! relative permeability of PMs

$ H_PM = B_PM/(mu_PM*pi*4d-7)
! [A/m] magnetization of PMs

$ Id = 0
! [A] d-axis current

$ Iq = 0
! [A] q-axis current

$ Nph = 186
! Number of phase turns

$ Scs = 0.00154555
! [m^2] area of the coil side
End

Simulation
Max Output Level = 5
Coordinate System = Cartesian
Coordinate Mapping(3) = 1 2 3
Simulation Type = Transient
Timestepping Method = BDF
BDF Order = 2
Timestep Sizes = $ 1/(w_el/2/pi)/6/30! 180 samples per el. period
Timestep Intervals = 31
Output Intervals = 1
!!!!!!!! mesh interpolation tolerances
! Interpolation Numeric Epsilon = Real 5.0e-9
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

!!!!!!!!!!!!!!!!!!!!!!!!!! Materials !!!!!!!!!!!!!!!!!!!!!!!!!!!

Material 1
Name = "Air"
Relative Permeability = 1
End

Material 2
Name = "Iron (generic)"
Electric Conductivity = 10.30e6
Density = 7870.0
Electric Conductivity = 10.30e6
Poisson ratio = 0.29
Mesh Poisson ratio = 0.29
Heat Capacity = 449.0
Youngs modulus = 193.053e9
Heat expansion Coefficient = 11.8e-6
Heat Conductivity = 80.2
Sound speed = 5000.0
End

Material 3
Name = "PM_right"
Relative Permeability = $ mu_PM
Magnetization 1 = Variable time, timestep size
Real MATC "H_PM*cos(w_m*(tx(0)-tx(1)))"
Magnetization 2 = Variable time, timestep size
Real MATC "H_PM*sin(w_m*(tx(0)-tx(1)))"
End

Material 4
Name = "PM_up"
Relative Permeability = $ mu_PM
Magnetization 1 = Variable time, timestep size
Real MATC "-H_PM*sin(w_m*(tx(0)-tx(1)))"
Magnetization 2 = Variable time, timestep size
Real MATC "H_PM*cos(w_m*(tx(0)-tx(1)))"
End

Material 5
Name = "PM_left"
Relative Permeability = $ mu_PM
Magnetization 1 = Variable time, timestep size
Real MATC "-H_PM*cos(w_m*(tx(0)-tx(1)))"
Magnetization 2 = Variable time, timestep size
Real MATC "-H_PM*sin(w_m*(tx(0)-tx(1)))"
End

Material 6
Name = "PM_down"
Relative Permeability = $ mu_PM
Magnetization 1 = Variable time, timestep size
Real MATC "H_PM*sin(w_m*(tx(0)-tx(1)))"
Magnetization 2 = Variable time, timestep size
Real MATC "-H_PM*cos(w_m*(tx(0)-tx(1)))"
End

!!!!!!!!!!!!!!!!!!!!!!!!!! Boundary conditions !!!!!!!!!!!!!!!!!!!!!!!!!!!

!outer boundary Dirichlet
Boundary Condition 1
Target Boundaries(1) = 1
Name = "Boundary_Outer"
Potential Condition = 0
Potential = 0
End

Boundary Condition 2
Target Boundaries(1) = 2
Name = "Sliding"
Discontinuous Boundary = Logical True
Save Line = True
Mortar BC = 3
End

!!!!!!!!!!!!!!!!!!!!!!!!!! Body Forces !!!!!!!!!!!!!!!!!!!!!!!!!!!

!rotation of the rotor
Body Force 1
Name = "BodyForce_Rotation"
Mesh Rotate 3 = Variable time, timestep size
Real MATC "180/pi*w_m*(tx(0)-tx(1))" ! in degrees
End

!!!!!!!!!!!!!!!!!!!!!!!!!! Solver parameters !!!!!!!!!!!!!!!!!!!!!!!!!!!

!mesh rotation
Solver 1
Exec Solver = Before Timestep
Equation = MeshDeform
Procedure = "RigidMeshMapper" "RigidMeshMapper"
End

! solver for magnetic vector potential A [Vs/m]
Solver 2
Equation = MgDyn2D
Procedure = "MagnetoDynamics2D" "MagnetoDynamics2D"
Exec Solver = Always

Nonlinear System Convergence Tolerance = 1.0e-6
Nonlinear System Max Iterations = 20
Nonlinear System Relaxation Factor = 1

Linear System Solver = Direct
Linear System Direct Method = UMFPACK
End

!solver for magnetic flux density B [T]
!does not require settings for nonlinear solver
Solver 3
Equation = MgDyn2DPost
Procedure = "MagnetoDynamics2D" "BSolver"
Exec Solver = After Timestep

Linear System Solver = Direct
Linear System Direct Method = UMFPACK

Discontinuous Galerkin = True
Average Within Materials = False
End

!save to VTU format for ParaView with faces' IDs
Solver 4
Exec Solver = After Timestep
Procedure = "ResultOutputSolve" "ResultOutputSolver"
Output File Name = "step"
Vtu Format = True
Binary Output = True
Single Precision = True
Save Geometry Ids = True
End

!save scalar variables - torque T [Nm]
Solver 5
Exec Solver = After Timestep
Filename = "scalars.dat"
Procedure = "SaveData" "SaveScalars"
Show Norm Index = 1
End

Equation 1
Name = "ModelDomain"
Active Solvers(5) = 1 2 3 4 5
End

!!!!!!!!!!!!!!!!!!!!!!!!!! Bodies are here !!!!!!!!!!!!!!!!!!!!!!!!!!!

Body 1
Target Bodies(1) = 1
Name = "rotor"
Equation = 1
Material = 1
Body Force = 1
End

Body 2
Target Bodies(1) = 2
Name = "PM1"
Equation = 1
Material = 4
Body Force = 1
End

Body 3
Target Bodies(1) = 3
Name = "PM2"
Equation = 1
Material = 3
Body Force = 1
End

Body 4
Target Bodies(1) = 4
Name = "PM3"
Equation = 1
Material = 6
Body Force = 1
End

Body 5
Target Bodies(1) = 5
Name = "PM4"
Equation = 1
Material = 5
Body Force = 1
End

Body 6
Target Bodies(1) = 6
Name = "U+"
Equation = 1
Material = 1
End

Body 7
Target Bodies(1) = 7
Name = "V-"
Equation = 1
Material = 1
End

Body 8
Target Bodies(1) = 8
Name = "V-"
Equation = 1
Material = 1
End

Body 9
Target Bodies(1) = 9
Name = "W+"
Equation = 1
Material = 1
End

Body 10
Target Bodies(1) = 10
Name = "W+"
Equation = 1
Material = 1
End

Body 11
Target Bodies(1) = 11
Name = "U-"
Equation = 1
Material = 1
End

Body 12
Target Bodies(1) = 12
Name = "U-"
Equation = 1
Material = 1
End

Body 13
Target Bodies(1) = 13
Name = "U+"
Equation = 1
Material = 1
End

Body 14
Target Bodies(1) = 14
Name = "W-"
Equation = 1
Material = 1
End

Body 15
Target Bodies(1) = 15
Name = "W-"
Equation = 1
Material = 1
End

Body 16
Target Bodies(1) = 16
Name = "V+"
Equation = 1
Material = 1
End

Body 17
Target Bodies(1) = 17
Name = "V+"
Equation = 1
Material = 1
End

Body 18
Target Bodies(1) = 18
Name = "U-"
Equation = 1
Material = 1
End

Body 19
Target Bodies(1) = 19
Name = "U+"
Equation = 1
Material = 1
End

Body 20
Target Bodies(1) = 20
Name = "V-"
Equation = 1
Material = 1
End

Body 21
Target Bodies(1) = 21
Name = "V-"
Equation = 1
Material = 1
End

Body 22
Target Bodies(1) = 22
Name = "W+"
Equation = 1
Material = 1
End

Body 23
Target Bodies(1) = 23
Name = "U-"
Equation = 1
Material = 1
End

Body 24
Target Bodies(1) = 24
Name = "U+"
Equation = 1
Material = 1
End

Body 25
Target Bodies(1) = 25
Name = "W-"
Equation = 1
Material = 1
End

Body 26
Target Bodies(1) = 26
Name = "V+"
Equation = 1
Material = 1
End

Body 27
Target Bodies(1) = 27
Name = "V+"
Equation = 1
Material = 1
End

Body 28
Target Bodies(1) =28
Name = "W-"
Equation = 1
Material = 1
End

Body 29
Target Bodies(1) = 29
Name = "W+"
Equation = 1
Material = 1
End

Body 30
Target Bodies(1) = 30
Name = "stator lamination"
Equation = 1
Material = 2
End

Body 31
Target Bodies(1) = 31
Name = "stator airgap"
Equation = 1
Material = 1
End

Body 32
Target Bodies(1) = 32
Name = "rotor airgap"
Equation = 1
Material = 1
Body Force = 1
r outer = Real 0.033
r inner = Real 0.0325
End
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: How to solve ERROR:: CreateDiscontMes

Post by kevinarden »

WARNING:: CreateDiscontMesh: Missing 2 parent elements in partition 0
ERROR:: CreateDiscontMesh: Alternative strategy requires all parent elements!

to me this means it is a mesh issue, there are 2 boundary elements that are missing parent elements.
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: How to solve ERROR:: CreateDiscontMes

Post by raback »

Hi

Is it intentional that you want to split the mesh along a boundary. Usually the stator and rotor and separated already at birth. You are probably following a test case where this is not the case and it is done afterwards. However, you can only do it for internal BCs where you have two parents for each boundary element.

-Peter
sheetu
Posts: 26
Joined: 30 Mar 2021, 06:55
Antispam: Yes

Re: How to solve ERROR:: CreateDiscontMes

Post by sheetu »

yeah, I want to create the boundary between rotor and stator mesh. How should I resolve this issue??
sheetu
Posts: 26
Joined: 30 Mar 2021, 06:55
Antispam: Yes

Re: How to solve ERROR:: CreateDiscontMes

Post by sheetu »

I'm still not able to solve the issue, can anyone help me out??

geometry and sif file link is attached below.

https://drive.google.com/drive/folders/ ... sp=sharing
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: How to solve ERROR:: CreateDiscontMes

Post by raback »

Hi

Your BCs don't really make any sense. The geometry is rather pretty and complex having 248 boundaries defined. However, your BCs just refer to 1 and 2 which happen to be segments close to the origin.

Note that even if you have air you cannot skip it since electromagnetic are active also in air. Now your mesh has holes.

-Peter
sheetu
Posts: 26
Joined: 30 Mar 2021, 06:55
Antispam: Yes

Re: How to solve ERROR:: CreateDiscontMes

Post by sheetu »

Thank you, sir.
Post Reply