Temperature Condition

Numerical methods and mathematical models of Elmer
Post Reply
MrChips
Posts: 33
Joined: 12 Jul 2016, 00:16
Antispam: Yes
Location: Canada

Temperature Condition

Post by MrChips »

In my model I have set the temperature of a boundary and use the 'Temperature Condition' to define when this temperature condition is active (using a negative or positive value). It works, but not on the first timestep. On the first timestep it seems to ignore the 'Temperature Condition', even if I set up something like this.

Code: Select all

Boundary Condition 1
  Name = "Heater"
  Target Boundaries(7) = 1 2 3 4 5 6 7  
  Temperature = 823.15
   Temperature Condition = Real -1 
End
When I review in Paraview, the boundary is set to 823.15 for the first timestep and then on the second timestep the 'Temperature Condition' turns it off. I am sure this is something simple, but I cannot figure it out.
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Temperature Condition

Post by kevinarden »

I guessing the code treats it as a switch, the default is on for the first iteration, and then it checks for a switch. Currently you have it to be defined as always off, so why set a boundary condition that is always off? I am assuming this is in a transient solution? So you could just do

Boundary Condition 1
Name = "Heater"
Target Boundaries(7) = 1 2 3 4 5 6 7
Temperature = Variable Time
Real
0.0 0.0
0.1 823.15
0.2 0.0
0.3 823.15
0.4 0.0
End
End

depending on your time step, and on/off goals.
MrChips
Posts: 33
Joined: 12 Jul 2016, 00:16
Antispam: Yes
Location: Canada

Re: Temperature Condition

Post by MrChips »

I thank you for the suggestions. I set the temperature condition as always off just to confirm my suspicion that it was being ignored.

My boundary condition is a bit more complex and I cannot set-up a timed approach as you have written out. My boundary condition has both a dirichlet condition and a heat flux condition. I start my simulation off with a heat flux condition 'on' and with the temperature condition 'turned off'. I then take advantage of the fact that Elmer prioritizes dirichlet conditions over Neumann conditions, so when I 'turn on' the temperature condition it causes Elmer to ignore the Neumann condition I had set for the first part of the simulation. With Elmer ignoring that I want the temperature condition turned off on the very first timestep, it causes the Neumann condition to also be ignored.

I have gotten around this by setting the first timestep to be very very small so it doesn't impact my simulation too much.

Thanks,
MrChips
Post Reply