Closed thilomaurer closed 6 years ago
case.sif:
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 Property 1"
Equation = 1
Material = 1
End
Body 2
Target Bodies(1) = 2
Name = "Body Property 2"
Equation = 1
Material = 2
End
Solver 1
Equation = MgDynPost
Calculate Current Density = True
Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"
Discontinuous Bodies = True
Calculate Electric Field = True
Calculate Magnetic Field Strength = True
Calculate Joule Heating = True
Exec Solver = Before Saving
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
Solver 2
Equation = MgDyn
Procedure = "MagnetoDynamics" "WhitneyAVSolver"
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 = BiCGStabl
Linear System Max Iterations = 500
Linear System Convergence Tolerance = 1.0e-10
BiCGstabl polynomial degree = 4
Linear System Preconditioning = none
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = True
Linear System Residual Output = 10
Linear System Precondition Recompute = 1
End
Equation 1
Name = "Equation 1"
Active Solvers(2) = 1 2
End
Material 1
Name = "Copper (generic)"
Electric Conductivity = 59.59e6
Heat expansion Coefficient = 16.5e-6
Relative Permeability = 0.999994
Relative Permeability = 0.999994
Heat Conductivity = 401.0
Sound speed = 3810.0
Heat Capacity = 385.0
Mesh Poisson ratio = 0.34
Density = 8960.0
Electric Conductivity = 59.59e6
Poisson ratio = 0.34
Youngs modulus = 115.0e9
End
Material 2
Name = "Air (room temperature)"
Viscosity = 1.983e-5
Heat expansion Coefficient = 3.43e-3
Relative Permittivity = 1.00059
Relative Permeability = 1.00000037
Relative Permeability = 1.00000037
Heat Conductivity = 0.0257
Relative Permittivity = 1.00059
Sound speed = 343.0
Heat Capacity = 1005.0
Density = 1.205
End
Hi Thilo
It seems, that the "CalcFIelds" initailization subroutine requires that the "WhitneyAvSolver" initialization subroutine has already been executed. The initializations as well as the actual solvers are executed in the order of the "Solver" -section numbering in the .sif file.
So changing the "Solver" numbering in the .sif file should be enough to prevent the core dump ?
BR, Juha
From: "Thilo Maurer" notifications@github.com To: "ElmerCSC" elmerfem@noreply.github.com Cc: "Subscribed" subscribed@noreply.github.com Sent: Wednesday, 23 May, 2018 23:50:01 Subject: Re: [ElmerCSC/elmerfem] [MagnetoDynamics] Segmentation fault - invalid memory reference (#140)
case.sif:
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 Property 1" Equation = 1 Material = 1 End Body 2 Target Bodies(1) = 2 Name = "Body Property 2" Equation = 1 Material = 2 End Solver 1 Equation = MgDynPost Calculate Current Density = True Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields" Discontinuous Bodies = True Calculate Electric Field = True Calculate Magnetic Field Strength = True Calculate Joule Heating = True Exec Solver = Before Saving 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 Solver 2 Equation = MgDyn Procedure = "MagnetoDynamics" "WhitneyAVSolver" 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 = BiCGStabl Linear System Max Iterations = 500 Linear System Convergence Tolerance = 1.0e-10 BiCGstabl polynomial degree = 4 Linear System Preconditioning = none Linear System ILUT Tolerance = 1.0e-3 Linear System Abort Not Converged = True Linear System Residual Output = 10 Linear System Precondition Recompute = 1 End Equation 1 Name = "Equation 1" Active Solvers(2) = 1 2 End Material 1 Name = "Copper (generic)" Electric Conductivity = 59.59e6 Heat expansion Coefficient = 16.5e-6 Relative Permeability = 0.999994 Relative Permeability = 0.999994 Heat Conductivity = 401.0 Sound speed = 3810.0 Heat Capacity = 385.0 Mesh Poisson ratio = 0.34 Density = 8960.0 Electric Conductivity = 59.59e6 Poisson ratio = 0.34 Youngs modulus = 115.0e9 End Material 2 Name = "Air (room temperature)" Viscosity = 1.983e-5 Heat expansion Coefficient = 3.43e-3 Relative Permittivity = 1.00059 Relative Permeability = 1.00000037 Relative Permeability = 1.00000037 Heat Conductivity = 0.0257 Relative Permittivity = 1.00059 Sound speed = 343.0 Heat Capacity = 1005.0 Density = 1.205 End
— You are receiving this because you are subscribed to this thread. Reply to this email directly, [ https://github.com/ElmerCSC/elmerfem/issues/140#issuecomment-391491569 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/AKbmSoNcWy3QXA4n2zBuYJ8m-4-ma7EEks5t1ct5gaJpZM4ULKQu | mute the thread ] .
I made the CalcFields a little smarter and hence it can now be initialized also before the primary solver.
Receiving Segfault
GDBing:
In fem/src/modules/MagnetoDynamics/CalcFields.F90:97
Please fix