simple thermal cycling simulation
simple thermal cycling simulation
Hi. I would like to perform a transient simulation for temperature between -45 degree Celsius to 125 degree Celsius to find out what is the Von Mises stress experienced by the object during that period of time. Below are some doubts I have regarding this simulation :
1. Do i need to activate the heat equation OR just linear elasticity equation?
2. Do i need to set boundary conditions or just initial conditions?
3. Where do I input the temperature change (45 degree to 125)?
hope to have some feedback regarding my simulation.
Thanks and Regards,
Karuna
1. Do i need to activate the heat equation OR just linear elasticity equation?
2. Do i need to set boundary conditions or just initial conditions?
3. Where do I input the temperature change (45 degree to 125)?
hope to have some feedback regarding my simulation.
Thanks and Regards,
Karuna
Re: simple thermal cycling simulation
Hi,
I am not experienced im mechanics, but I would respond to your questions as follows:
1. You absolutely need the heat equation also.
2. You need boundary conditions for the temperature at least.
3, It depends on your geometry and the situation you want to examine.
HTH,
Matthias
I am not experienced im mechanics, but I would respond to your questions as follows:
1. You absolutely need the heat equation also.
2. You need boundary conditions for the temperature at least.
3, It depends on your geometry and the situation you want to examine.
HTH,
Matthias
Re: simple thermal cycling simulation
Karuna,
The word 'Temperature" after LocalTemperature in the call statement is the "Temperature" which is obtained by ElmerSolver from HeatSolve.F90 (or technically HeatSolve.so in linux). Please find the words "Temperature" and "LocalTemperature" in the following code snippet of HeatSolve.F90.
(2) Varying BCs: For cyclic requirements of T variable, You can define source BCs which vary with time and you can present them with MATC expressions or User Defined Functions (UDFs).
Cheers,
Yours Sincerely,
Anil Kunwar
I reiterate the words of Matthias: You need two solvers (1) Stress Solver (for displacement variable and subsequent stress presentations in StressSolve.F90) , (2) Heat Solver (Temperature Variable in HeatSolve.F90). You may have presented the question following the description in Elmer Models Manual. In order to find out more on what really is happening, please look inside the source codes of StressSolve.F90Karuna wrote:Hi. I would like to perform a transient simulation for temperature between -45 degree Celsius to 125 degree Celsius to find out what is the Von Mises stress experienced by the object during that period of time. Below are some doubts I have regarding this simulation :
1. Do i need to activate the heat equation OR just linear elasticity equation?
Code: Select all
! Get material parameters:
! ------------------------
Material => GetMaterial()
CALL InputTensor( HeatExpansionCoeff, Isotropic(2), &
'Heat Expansion Coefficient', Material, n, Element % NodeIndexes, GotHeatExp )
CALL InputTensor( ElasticModulus, Isotropic(1), &
'Youngs Modulus', Material, n, Element % NodeIndexes )
PlaneStress = ListGetLogical( Equation, 'Plane Stress', stat )
PoissonRatio(1:n) = GetReal( Material, 'Poisson Ratio', Stat )
! Element nodal points:
! ---------------------
CALL GetElementNodes( Nodes )
! Displacement field at element nodal points:
! -------------------------------------------
CALL GetVectorLocalSolution( LocalDisplacement, USolver=Solver )
IF( GotHeatExp ) THEN
ReferenceTemperature(1:n) = GetReal(Material, 'Reference Temperature', Found )
CALL GetScalarLocalSolution( LocalTemperature, 'Temperature', USolver=Solver )
LocalTemperature(1:n) = LocalTemperature(1:n) - ReferenceTemperature(1:n)
ELSE
LocalTemperature(1:n) = 0.0_dp
END IF
Code: Select all
REAL(KIND=dp), POINTER :: Temperature(:),PrevTemperature(:),FlowSolution(:), &
ElectricCurrent(:), PhaseChangeIntervals(:,:),ForceVector(:), &
PrevSolution(:), HC(:), Hwrk(:,:,:),MeshVelocity(:), XX(:), YY(:),ForceHeater(:),&
RealWork(:,:)
REAL(KIND=dp), ALLOCATABLE :: vals(:)
REAL(KIND=dp) :: Jx,Jy,Jz,JAbs, Power, MeltPoint, IntHeatSource
INTEGER, ALLOCATABLE, SAVE :: Indexes(:), SaveIndexes(:)
REAL(KIND=dp), ALLOCATABLE :: MASS(:,:), &
STIFF(:,:), LOAD(:), HeatConductivity(:,:,:), &
FORCE(:), U(:), V(:), W(:), MU(:,:),TimeForce(:), &
Density(:), LatentHeat(:), HeatTransferCoeff(:), &
HeatCapacity(:), Enthalpy(:), EnthalpyFraction(:), Viscosity(:), LocalTemperature(:), &
NodalEmissivity(:), ElectricConductivity(:), Permeability(:), Work(:), C0(:), &
Pressure(:), dPressuredt(:), GasConstant(:),AText(:), HeaterArea(:), &
HeaterTarget(:), HeaterScaling(:), HeaterDensity(:), HeaterSource(:), &
HeatExpansionCoeff(:), ReferenceTemperature(:), PressureCoeff(:), &
PhaseVelocity(:,:), HeatConductivityIso(:), &
PerfusionRate(:), PerfusionDensity(:), PerfusionHeatCapacity(:), PerfusionRefTemperature(:)
I assume you are talking of temperature variable. Since, you are performing transient simulation, Initial Condition needs to be set up for the simulation. And, as you are solving heat equation by FEM, you will be using Boundary conditions (BCs) whether you set or not. When you set, you will set as you like or need. When you leave unset, the FEM will assume zero flux boundary condition irrespective of your actual requirements.Karuna wrote:2. Do i need to set boundary conditions or just initial conditions?
(1) Constant BCs: For example, if you neglect convection heat transfer and you can set dirichlet BC on two opposite ends for the Heat Solver. One with (-45 + 273.15) K and another with (125 + 273.15) K. When I consider it a square geometry, the remaining ends are set with zero heat flux (no setting required here). Virtually, you are coupling T (scalar) and u (vector) i.e. u_x,u_y (scalars in 2D) variables. Actually, BCs 1...n means the geometrical boundaries where you put the boundary conditions of both Heat and Stress solvers.Karuna wrote:3. Where do I input the temperature change (45 degree to 125)?
(2) Varying BCs: For cyclic requirements of T variable, You can define source BCs which vary with time and you can present them with MATC expressions or User Defined Functions (UDFs).
Cheers,
Yours Sincerely,
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
Re: simple thermal cycling simulation
Thank you for the inputs given. will try it for my simulation.
Currently I'm working on the steady state stress simulation. But, when I run the simulation, it says simulation finished even when the assembly process is yet to begin. I have attached my sif file here. hope I could get some answers to my problem.
Thanks.
Regards,
Karuna
Currently I'm working on the steady state stress simulation. But, when I run the simulation, it says simulation finished even when the assembly process is yet to begin. I have attached my sif file here. hope I could get some answers to my problem.
Thanks.
Regards,
Karuna
- Attachments
-
- case.sif
- (2.49 KiB) Downloaded 297 times
-
- Site Admin
- Posts: 4812
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: simple thermal cycling simulation
Hi
Looks fine to me except for the BC where the "Force 2" is overrun by the Dirichlet condition.
-Peter
Looks fine to me except for the BC where the "Force 2" is overrun by the Dirichlet condition.
-Peter
Re: simple thermal cycling simulation
Hi,
I have omitted the BC related to the Dirichlet condition. however, my simulation still have some problem.
the following error appeared :
" Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error: "
May I know, what are the possible causes for such error?
Thanks
Karuna
I have omitted the BC related to the Dirichlet condition. however, my simulation still have some problem.
the following error appeared :
" Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error: "
May I know, what are the possible causes for such error?
Thanks
Karuna
Re: simple thermal cycling simulation
Karuna,
Several reasons are for it.
One of the reasons is too fine mesh. Try with coarser mesh.
Easy suggestion for you is to make a sample complete test and upload here by compressing in zip file.
Elmer experts can give your suggestion more quickly.
Yours Sincerely,
Anil Kunwar
Several reasons are for it.
One of the reasons is too fine mesh. Try with coarser mesh.
Easy suggestion for you is to make a sample complete test and upload here by compressing in zip file.
Elmer experts can give your suggestion more quickly.
Yours Sincerely,
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
Re: simple thermal cycling simulation
Hi Anil,
I have attached the files of my simulation. Hope you or others could provide me some solutions caused by the error. I have attached the .UNV file as well.
Thanks.
Regards,
Karuna
I have attached the files of my simulation. Hope you or others could provide me some solutions caused by the error. I have attached the .UNV file as well.
Thanks.
Regards,
Karuna
- Attachments
-
- force exerted on package.PNG
- the force to b exerted on body 2 as shown in the figure
- (74.12 KiB) Not downloaded yet
-
- netgen.unv
- the mesh file from salome
- (262.59 KiB) Downloaded 250 times
-
- saved project.rar
- elmer project file
- (50.16 KiB) Downloaded 261 times
Re: simple thermal cycling simulation
Hi Karuna,
A. I tested your simulation with mesh files and the simulation runs perfect when I run with target bodies and boundaries numbers .
The commands I used in my Ubuntu 16.04 computer are:
1. Convert the mesh file from unv format to ElmerGrid mesh format and use autoclean
2. The netgen directory is in the same directoy along with case.sif file. So, i renamed Mesh path in the Mesh block of case.sif file as
3. Then I ran the simulation as:
(The case,sif is designated as input file in ELMERSOLVER_STARTINFO file)
4. The output result for stress_xx is as in the following picture. 5. The mesh volumes (bodies) and boundaries read by elmer are given in entities.sif within netgen directory/folder once we complete step 1 above.
B. The names of bodies and boundaries can be used instead of target n if we use logical mesh names in simulation block of solver input file. In this case it shows segmentation fault as you have mentioned before.
Yours Sincerely,
Anil Kunwar
A. I tested your simulation with mesh files and the simulation runs perfect when I run with target bodies and boundaries numbers .
The commands I used in my Ubuntu 16.04 computer are:
1. Convert the mesh file from unv format to ElmerGrid mesh format and use autoclean
Code: Select all
$ ElmerGrid 8 2 netgen.unv -autoclean
Code: Select all
Header
CHECK KEYWORDS Warn
Mesh DB "." "netgen"
Include Path ""
Results Directory ""
End
Code: Select all
$ ElmerSolver
4. The output result for stress_xx is as in the following picture. 5. The mesh volumes (bodies) and boundaries read by elmer are given in entities.sif within netgen directory/folder once we complete step 1 above.
Code: Select all
!------ Skeleton for body section -----
Body 1
Name = FR4
End
Body 2
Name = SI
End
Body 3
Name = SAC
End
!------ Skeleton for boundary section -----
Boundary Condition 1
Name = bnry4
End
Yours Sincerely,
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
Re: simple thermal cycling simulation
Karuna,
1. Though it has another issue related to Failed Solver Convergence Tolerance, the issue of segmentation fault was resolved when i changed the dofs of displacement from 2 to 3.
Please see the modified solver input file.
Now, you can adjust your simulation parameters to proceed towards the numerical convergence of the solution. Cheers.
Yours Sincerely,
Anil Kunwar
1. Though it has another issue related to Failed Solver Convergence Tolerance, the issue of segmentation fault was resolved when i changed the dofs of displacement from 2 to 3.
Please see the modified solver input file.
Code: Select all
Header
CHECK KEYWORDS Warn
Mesh DB "." "netgen"
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.ep
Post File = case.vtu
Coordinate Scaling = Real 0.001
Use Mesh Names = Logical True ! Mesh names can be used besides the bodies and boundary
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 = "FR4"
Equation = 1
Material = 1
Body Force = 1
End
Body 2
!Target Bodies(1) = 2
Name = "SI"
Equation = 1
Material = 2
Body Force = 1
End
Body 3
!Target Bodies(1) = 3
Name = "SAC"
Equation = 1
Material = 3
Body Force = 1
End
Solver 1
Equation = Linear elasticity
Procedure = "StressSolve" "StressSolver"
Variable = -dofs 3 Displacement
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 = 1
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 = GCR
Linear System Max Iterations = 500
Linear System Convergence Tolerance = 1.0e-10
BiCGstabl polynomial degree = 2
Linear System Preconditioning = ILU1
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 1
Linear System Precondition Recompute = 1
End
Equation 1
Name = "stress"
Calculate Stresses = True
Active Solvers(1) = 1
End
Material 1
Name = "FR4"
Heat Conductivity = 10
Heat Capacity = 879
Density = 1938
Poisson ratio = 0.11
Youngs modulus = 22000e6
End
Material 2
Name = "si"
Heat Conductivity = 83.7
Heat Capacity = 687
Density = 2330
Poisson ratio = 0.2783
Youngs modulus = 130194e6
End
Material 3
Name = "SAC"
Heat Conductivity = 51
Heat Capacity = 150
Density = 8470
Poisson ratio = 0.36
Youngs modulus = 44377e6
End
Body Force 1
Name = "stress"
Stress Bodyforce 2 = -22857.3
End
Boundary Condition 1
!Target Boundaries(1) = 2
Name = "bnry4"
Force 2 = -1.904761
End
Yours Sincerely,
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice