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.

Initial values from solution

Please login with a confirmed email address before reporting spam

Hi,

I have a time dependent heat transfer problem, which I solve for t=0 to t=1 second.
Then I use the solution as initial value for the next simulation from t=1 to t=2.

This all works fine, however in the second simulation I add another feature to the geometry. My question is:
a) What initial values does COMSOL choose for this new feature (since there is no solution for this part available)?
b) How can I change the initial values for the new geometry feature while still using the solution of the previous simulation as initial conditions for all other features?

Regards,

Peter.

13 Replies Last Post 26 apr 2011, 16:10 GMT-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 1 mar 2011, 09:36 GMT-5
Hi

I believe the "new" feature (= new domain ?) would get the default "zero" initial settings, you might use an extrusion coupling variable to set the initial condition node from a common boundary of the first analysis.

but basically if you solve from 0 to 1, then stop and "restart" between 1 and 2 normally COMSOL will use the previous calculated values. But any new topology is starting in default (all zero) state.

One other way could be to use a time dependent material property for the new domain, so it appears (gently, smoothly with some smoothed Heaviside type function) during the transient study

--
Good luck
Ivar
Hi I believe the "new" feature (= new domain ?) would get the default "zero" initial settings, you might use an extrusion coupling variable to set the initial condition node from a common boundary of the first analysis. but basically if you solve from 0 to 1, then stop and "restart" between 1 and 2 normally COMSOL will use the previous calculated values. But any new topology is starting in default (all zero) state. One other way could be to use a time dependent material property for the new domain, so it appears (gently, smoothly with some smoothed Heaviside type function) during the transient study -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 1 mar 2011, 10:00 GMT-5
Hi Ivar,

You are right, the new feature are initialised with all zero initial conditions. However, something else strange happens...

The newly added feature, behave totally different from the already existing features. It changes temperature instantaneously. I have checked for all other variables (material properties, thermal insulation etc.) and they are all the same, yet the material behaves totally different. Which I do no understand at all... Any idea what this could be?

Regards,

Peter.
Hi Ivar, You are right, the new feature are initialised with all zero initial conditions. However, something else strange happens... The newly added feature, behave totally different from the already existing features. It changes temperature instantaneously. I have checked for all other variables (material properties, thermal insulation etc.) and they are all the same, yet the material behaves totally different. Which I do no understand at all... Any idea what this could be? Regards, Peter.

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 mar 2011, 10:50 GMT-5
Hi

strange indeed, haven't noticed anything like that before, but mostly thee are some rationale explanations, mostly evident, once discovered ;)

--
Good luck
Ivar
Hi strange indeed, haven't noticed anything like that before, but mostly thee are some rationale explanations, mostly evident, once discovered ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2 mar 2011, 06:54 GMT-5
Hi again!

I have looked further into it, and the problem isn't really that the new feature behaves differently, actually.

It may perhaps by initialiased at zero, but even before the solver starts, the temperature is different. Looking like the attached image.

It seems COMSOL does some strange interpolation before it starts solving. Any idea what happens? It would help me a lot!

Thanks!

Regards,

Peter

PS: The temperature of the square and left rectangle are from a previous simulation and the right rectangle on top of the square is added (which should be uniformly 0 K).
Hi again! I have looked further into it, and the problem isn't really that the new feature behaves differently, actually. It may perhaps by initialiased at zero, but even before the solver starts, the temperature is different. Looking like the attached image. It seems COMSOL does some strange interpolation before it starts solving. Any idea what happens? It would help me a lot! Thanks! Regards, Peter PS: The temperature of the square and left rectangle are from a previous simulation and the right rectangle on top of the square is added (which should be uniformly 0 K).


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 2 mar 2011, 07:24 GMT-5
Hi

well first of all a temperature of -11K isn't really physical, OK its a shift of scale to get positive, I hope that the math representation of the physics behind COMSOL thermal does not limit to T>0 someway

Again it looks strange, not sure what to say. You can alsways send your model to Support and have them look into it ;)

--
Good luck
Ivar
Hi well first of all a temperature of -11K isn't really physical, OK its a shift of scale to get positive, I hope that the math representation of the physics behind COMSOL thermal does not limit to T>0 someway Again it looks strange, not sure what to say. You can alsways send your model to Support and have them look into it ;) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2 mar 2011, 07:37 GMT-5
Hi,

Of course -11 K is physically not achievable (i want 0 K) ;) but I just used zero K as a reference temperature.
Thanks for looking at it again. I send a copy of the files to support indeed.

Regards,

Peter
Hi, Of course -11 K is physically not achievable (i want 0 K) ;) but I just used zero K as a reference temperature. Thanks for looking at it again. I send a copy of the files to support indeed. Regards, Peter

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24 apr 2011, 20:12 GMT-4

Hi,

I have a time dependent heat transfer problem, which I solve for t=0 to t=1 second.
Then I use the solution as initial value for the next simulation from t=1 to t=2.

This all works fine, however in the second simulation I add another feature to the geometry. My question is:
a) What initial values does COMSOL choose for this new feature (since there is no solution for this part available)?
b) How can I change the initial values for the new geometry feature while still using the solution of the previous simulation as initial conditions for all other features?

Regards,

Peter.


Hi,

I am reading your post and i have a big question. How are you using the solutions at 1second as initial conditions for next simulation. I have to do the same, but also add new geometry + new material +new BC and i am not sure how to do that...
[QUOTE] Hi, I have a time dependent heat transfer problem, which I solve for t=0 to t=1 second. Then I use the solution as initial value for the next simulation from t=1 to t=2. This all works fine, however in the second simulation I add another feature to the geometry. My question is: a) What initial values does COMSOL choose for this new feature (since there is no solution for this part available)? b) How can I change the initial values for the new geometry feature while still using the solution of the previous simulation as initial conditions for all other features? Regards, Peter. [/QUOTE] Hi, I am reading your post and i have a big question. How are you using the solutions at 1second as initial conditions for next simulation. I have to do the same, but also add new geometry + new material +new BC and i am not sure how to do that...

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 25 apr 2011, 03:36 GMT-4
Hi

if you change the topology , then it could perhaps be possible to model it as 2 "linked models" (via extrusion or other type of coupling operators)

--
Good luck
Ivar
Hi if you change the topology , then it could perhaps be possible to model it as 2 "linked models" (via extrusion or other type of coupling operators) -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 25 apr 2011, 22:37 GMT-4
Hi,

I think i found a solution, but i can not say that is working the way i want. What i did is two physics. One for my geometry, but now the whole of it, i meshed only the part i need for the first 900 seconds. Then i have made another physics, but this time with my other BC, and meshing it with the final geometry. [ to get an idea, it is a pan with a steak on top of it. First part 900 without the steak, then i put the steak 900 more seconds]

I've made two steps, step one from 0 to 900 [transient heat analysis] and from 900 to 1800 same analysis. For each i chose the respective physics and mesh.

Everything works fine until i checked what is the temperature of my steak ( one disk on top of the pan ). The temperature was -27K, and this is not possible because my lowest temperature as an initial condition is 273.15, and the convective cooling BC is 300K ... i don't know what is happening, i guess the problem is coming from my mesh, but i have not adjust anything, i just selected the size and than build.
Hi, I think i found a solution, but i can not say that is working the way i want. What i did is two physics. One for my geometry, but now the whole of it, i meshed only the part i need for the first 900 seconds. Then i have made another physics, but this time with my other BC, and meshing it with the final geometry. [ to get an idea, it is a pan with a steak on top of it. First part 900 without the steak, then i put the steak 900 more seconds] I've made two steps, step one from 0 to 900 [transient heat analysis] and from 900 to 1800 same analysis. For each i chose the respective physics and mesh. Everything works fine until i checked what is the temperature of my steak ( one disk on top of the pan ). The temperature was -27K, and this is not possible because my lowest temperature as an initial condition is 273.15, and the convective cooling BC is 300K ... i don't know what is happening, i guess the problem is coming from my mesh, but i have not adjust anything, i just selected the size and than build.

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 26 apr 2011, 00:51 GMT-4
Hi
I see two ways:
1) try with one geometry containing everything, then set the material properties of the "steak" to air for the first 900 seconds, OK if you have convection it's delicate
2) 2 separate model coupled via stored solution and restart based on initial conditions (what I understand syou have done

So you must have missed something in the coupling, or the settings, I do not see why it does not work

I did a quick try, interesting, by using 2 HT and 2 timeseries, I had to update the solver sequence the following way:

1) set two time series, one for "ht" only, one for "ht2" alone. Add a store solution to position in between. Set the time series 2 Dependent variables to use the stored solution as initial conditions. In HT2 I have 2 initial conditions, one for T from first "ht" and the second for the "steak". I also added a thin thermal contact resistive layer for the oil

My pan is big, and the cooking is rather burning, the material arbitrary but the principle is in there ;)
its a v4.1.0.185 model

--
Good luck
Ivar
Hi I see two ways: 1) try with one geometry containing everything, then set the material properties of the "steak" to air for the first 900 seconds, OK if you have convection it's delicate 2) 2 separate model coupled via stored solution and restart based on initial conditions (what I understand syou have done So you must have missed something in the coupling, or the settings, I do not see why it does not work I did a quick try, interesting, by using 2 HT and 2 timeseries, I had to update the solver sequence the following way: 1) set two time series, one for "ht" only, one for "ht2" alone. Add a store solution to position in between. Set the time series 2 Dependent variables to use the stored solution as initial conditions. In HT2 I have 2 initial conditions, one for T from first "ht" and the second for the "steak". I also added a thin thermal contact resistive layer for the oil My pan is big, and the cooking is rather burning, the material arbitrary but the principle is in there ;) its a v4.1.0.185 model -- Good luck Ivar


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 26 apr 2011, 10:30 GMT-4
Hi Ivar,

I have opened the file you send me, but if u check right after it starts the second transient analysis the temperature drops to -270K for some reason, this is what bothers me. Several students around me are doing the same pan, and they have the same problem, the temperature starts at -200K when the second part of time dependent solution starts.
Hi Ivar, I have opened the file you send me, but if u check right after it starts the second transient analysis the temperature drops to -270K for some reason, this is what bothers me. Several students around me are doing the same pan, and they have the same problem, the temperature starts at -200K when the second part of time dependent solution starts.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 26 apr 2011, 10:48 GMT-4

(...) it starts the second transient analysis the temperature drops to -270K for some reason, this is what bothers me.


That is exactly what I found. What I did as a work around/solution is:

1) Run your first step with the default solver settings;
2) Update your geometry or whatever you want (please note: I only ADD geometry, I do NOT remove/change existing geometry);
3) Give your NEW geometry parts some initial conditions;
3) Now set these settings => Study 1 > Solver Configurations > Dependent Variables:
Initial Values of Variables Solved For > Method: Initial Expression, Solution: Solver 1, Time: Automatic
Initial Values of Variables Not Solved For > Method: Initial Expression, Solution: Solver 1, Time: Automatic
4) Solve your model.

This worked for me... ;)

Regards,

Peter
[QUOTE] (...) it starts the second transient analysis the temperature drops to -270K for some reason, this is what bothers me. [/QUOTE] That is exactly what I found. What I did as a work around/solution is: 1) Run your first step with the default solver settings; 2) Update your geometry or whatever you want (please note: I only ADD geometry, I do NOT remove/change existing geometry); 3) Give your NEW geometry parts some initial conditions; 3) Now set these settings => Study 1 > Solver Configurations > Dependent Variables: Initial Values of Variables Solved For > Method: Initial Expression, Solution: Solver 1, Time: Automatic Initial Values of Variables Not Solved For > Method: Initial Expression, Solution: Solver 1, Time: Automatic 4) Solve your model. This worked for me... ;) Regards, Peter

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 26 apr 2011, 16:10 GMT-4
Hi

you are right, I did too many changes and tests quickly ;) and missed the 100°C temperature difference between my two cases.

So to get it working:

1) take my model above, delete the Solver sequences, generate a new "default solver sequence"
2) select the time series 2 dependent variables of Solver Configuration - Solver 1 - Dependent Variables 2 (Time series 2) and set them to refer to "Solver 1", for bot values solved for an not solved for
3) compute
4) in the new plot group write T-T0 for the display temperature increase
5) Duplicate the Plot group and write T2-T0 for this second plot

Now it should work T at 1024 sec = T2 aqt 1024 sec, no "0 K", but we have lost the results from the first time series, and if I add the "store solution, then it restarts from "0 K", I have already noticed this on another case a few months ago and reported it to support, but they had then a good reason, forgotten why, will have to search it up.

I'll relaunch a question to support ;)

--
Good luck
Ivar
Hi you are right, I did too many changes and tests quickly ;) and missed the 100°C temperature difference between my two cases. So to get it working: 1) take my model above, delete the Solver sequences, generate a new "default solver sequence" 2) select the time series 2 dependent variables of Solver Configuration - Solver 1 - Dependent Variables 2 (Time series 2) and set them to refer to "Solver 1", for bot values solved for an not solved for 3) compute 4) in the new plot group write T-T0 for the display temperature increase 5) Duplicate the Plot group and write T2-T0 for this second plot Now it should work T at 1024 sec = T2 aqt 1024 sec, no "0 K", but we have lost the results from the first time series, and if I add the "store solution, then it restarts from "0 K", I have already noticed this on another case a few months ago and reported it to support, but they had then a good reason, forgotten why, will have to search it up. I'll relaunch a question to support ;) -- Good luck Ivar

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.