Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Reseting a domain in the middle of a time-dependent simulation

Please login with a confirmed email address before reporting spam

Hi

I am trying to build a heat-transfer transient simulation that is composed of several steps where some domains return to a given temperature in the middle of the run .

A simple description would be that there are 2 domains in contact that evolve together, but every given period one of them returns abruptly to a predefined temperature.

I've tried achieving this temperature reset through the use of 2 ht modules and 2 solver steps, but I can't manage to make it work.

The way I tried is the following:
- 2 ht modules using T and T2
- ht2 has some initial values for the domain that should be reset, and an initial value node for the other domain whete T2 is set to be T
- 2 study steps, that solve only for one of the temperatures and where the second step is configured as follows
> Variables solved for (i.e. T2)> Initial expression
> Variables not solved for (i.e.T) > Previous solution

My idea is that I get T from the end of the first part and use it to initialize the domain that is not changed.

Sadly - all of this is not working -the temperature transfer from 1st to 2nd step is not happening, and instead I get T=0K on this domain. See attached model.

Any idea where I might be wrong?
Any suggestion on how to perform this?

Thanks in advance


4 Replies Last Post 2 nov. 2011, 10:41 UTC−4
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 27 oct. 2011, 13:15 UTC−4
Hi

I believe you have at least two issues to check. And as a general remark, I would have used time dependent temperature boundary conditions, or heat fluxs or whatever.

The two things one must ensure is:
1) the steps to switch on and off should be smooth, with continuous derivatives (use the buildin step or pulse or.. functions), ther are new ones in 4.2a too ;)
2) the time solver stepping should not be set to automatic, but intermediate or strict, AND you should specify enough points in the transition regionS to for ce the solver to notice the step changes, and to adapt to these

--
Good luck
Ivar
Hi I believe you have at least two issues to check. And as a general remark, I would have used time dependent temperature boundary conditions, or heat fluxs or whatever. The two things one must ensure is: 1) the steps to switch on and off should be smooth, with continuous derivatives (use the buildin step or pulse or.. functions), ther are new ones in 4.2a too ;) 2) the time solver stepping should not be set to automatic, but intermediate or strict, AND you should specify enough points in the transition regionS to for ce the solver to notice the step changes, and to adapt to these -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 31 oct. 2011, 11:01 UTC−4
Hi Ivar, and thanks for the help


I believe you have at least two issues to check. And as a general remark, I would have used time dependent temperature boundary conditions, or heat fluxs or whatever.


Can you explain how a variable boundary condition will do a reset of the temperature in the bulk?

Thanks
Hi Ivar, and thanks for the help [QUOTE] I believe you have at least two issues to check. And as a general remark, I would have used time dependent temperature boundary conditions, or heat fluxs or whatever. [/QUOTE] Can you explain how a variable boundary condition will do a reset of the temperature in the bulk? Thanks

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 1 nov. 2011, 03:10 UTC−4
Hi

If its a full "reset" of the bulk, then I did not catch it correctly. But that is "not physical" from my understanding. I would retart the simulation with a new initial condition. Remains how to use partial solved and partial reset Initial conditions ?

On the other hand you need to stay "physical with function that can be derived, else the solver cannot find it's way out AND you do not respect any energy balance. Biffurcations are also tricky, as COMSOL cannot decide alone which track to follow ;)

--
Good luck
Ivar
Hi If its a full "reset" of the bulk, then I did not catch it correctly. But that is "not physical" from my understanding. I would retart the simulation with a new initial condition. Remains how to use partial solved and partial reset Initial conditions ? On the other hand you need to stay "physical with function that can be derived, else the solver cannot find it's way out AND you do not respect any energy balance. Biffurcations are also tricky, as COMSOL cannot decide alone which track to follow ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2 nov. 2011, 10:41 UTC−4
Hi Ivar,

Of course, I did not explain the entire situation, and the sample model was a toy model that is intended to illustrate the issue.

The true physical situation is a thin element on a rotating drum that comes into contact with some surrounding objects. For the brief contact time their temperatures evolve together, but afterwards the surrounding elements are exposed to other conditions that change their temperature. I do not wish to simulate these conditions, and all I care about is that next time an element comes into contact, it would have the initial temperature once again.

Does it seems more physical now?

I figured out how to make a switching contact, and I do use gradual switch to avoid convergence issues, but I can't get the temperature reset right. I was considering to use Matlab interface to do it, but I can't find any good example how to manipulate solutions under Matlab (any help would be appreciated) .

Thanks a lot


If its a full "reset" of the bulk, then I did not catch it correctly. But that is "not physical" from my understanding. I would retart the simulation with a new initial condition. Remains how to use partial solved and partial reset Initial conditions ?

On the other hand you need to stay "physical with function that can be derived, else the solver cannot find it's way out AND you do not respect any energy balance. Biffurcations are also tricky, as COMSOL cannot decide alone which track to follow ;)


Hi Ivar, Of course, I did not explain the entire situation, and the sample model was a toy model that is intended to illustrate the issue. The true physical situation is a thin element on a rotating drum that comes into contact with some surrounding objects. For the brief contact time their temperatures evolve together, but afterwards the surrounding elements are exposed to other conditions that change their temperature. I do not wish to simulate these conditions, and all I care about is that next time an element comes into contact, it would have the initial temperature once again. Does it seems more physical now? I figured out how to make a switching contact, and I do use gradual switch to avoid convergence issues, but I can't get the temperature reset right. I was considering to use Matlab interface to do it, but I can't find any good example how to manipulate solutions under Matlab (any help would be appreciated) . Thanks a lot [QUOTE] If its a full "reset" of the bulk, then I did not catch it correctly. But that is "not physical" from my understanding. I would retart the simulation with a new initial condition. Remains how to use partial solved and partial reset Initial conditions ? On the other hand you need to stay "physical with function that can be derived, else the solver cannot find it's way out AND you do not respect any energy balance. Biffurcations are also tricky, as COMSOL cannot decide alone which track to follow ;) [/QUOTE]

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.