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.

time dependent boundary conditions

Pavan Kumar Penumakala

Please login with a confirmed email address before reporting spam

hello all..

i am solving a time dependent heat transfer problem..

at the start ,for a rectangular domain boundaries 1 and 2 are insulated and 3 and 4 are assigned with constant temperature..
after some time t>100 my BC changes to all 1 2 3 and 4 boundaries insulated..
how can i do that

thanks in advance
pavan

9 Replies Last Post Apr 5, 2013, 7:50 p.m. EDT
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 May 20, 2012, 10:26 a.m. EDT
Hi

I would say either you stop and change your BC manually and then continue, or you write out the full equations for your bondaries such that at the time limit your BC changes from T=cte to Isolated (no normal heat flow) ,the first case is far quicker, 2nd more interesting (but I do not have the equations ready like that needs some thoughts and validations ;)

--
Good luck
Ivar
Hi I would say either you stop and change your BC manually and then continue, or you write out the full equations for your bondaries such that at the time limit your BC changes from T=cte to Isolated (no normal heat flow) ,the first case is far quicker, 2nd more interesting (but I do not have the equations ready like that needs some thoughts and validations ;) -- Good luck Ivar

Pavan Kumar Penumakala

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago May 22, 2012, 6:08 a.m. EDT
Dear Mr.Ivar

I am successful with the first method...

I run the simulation for first 100 sec and manually change the BC and continue the simualation from 100 sec to 300sec
I got the correct solution

but ...if i want to run the simulation at a time t=1 :1:300

on 3 and 4 boundaries i set
1. Temp BC t=900*(t<100)
2. Flux BC q=0*(t>100)*(t<300)

but this yield a wrong result..

can you comment on it

thanks
pavan
Dear Mr.Ivar I am successful with the first method... I run the simulation for first 100 sec and manually change the BC and continue the simualation from 100 sec to 300sec I got the correct solution but ...if i want to run the simulation at a time t=1 :1:300 on 3 and 4 boundaries i set 1. Temp BC t=900*(t100)*(t

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 May 22, 2012, 7:21 a.m. EDT
Hi

if you define a flux and a fixed temperature on the same boundary these are in contradiction, as the temperature is stabilised by exchanging the correct amount of heat flux. So the flux cannot be =0 and #0 in the same time

So you need to wait to the shortly arriving 4.3 to use conditional BC selected by solver / study

--
Good luck
Ivar
Hi if you define a flux and a fixed temperature on the same boundary these are in contradiction, as the temperature is stabilised by exchanging the correct amount of heat flux. So the flux cannot be =0 and #0 in the same time So you need to wait to the shortly arriving 4.3 to use conditional BC selected by solver / study -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 28, 2013, 2:00 a.m. EDT
Hi Ivar,

I am using COMSOL 4.0. After defining all the parameters (kthS and kthL), finally wrote equation for kth inside variable. kth=kthS*(T<Ttrans)+kthL*(T>=Ttrans)

But I am getting this error message below. Can you please help me how to get rid of this error.

Failed to evaluate expression.
- Expression: d(d((-(mod1.ht.k effxx*mod1.Tx*test(mod1.Tx)+mod1.ht.k effyy*mod1.Ty*test(mod1.Ty))*mod1.ht.dz)*(dvol),{test@1}),mod1.Ty)
Failed to evaluate variable.
- Variable: mod1.ht.k effyy
- Defined as: mod1.ht.kyy
Failed to evaluate variable.
- Variable: mod1.ht.kyy
- Defined as: kth
Failed to evaluate variable.
- Variable: kth
- Defined as: (((T<Ttrans)*kthS)+(kthL*(T>=Ttrans)))
Failed to evaluate variable.
- Variable: T
- Geometry: 1
- Domain: 1

Thanks
Hi Ivar, I am using COMSOL 4.0. After defining all the parameters (kthS and kthL), finally wrote equation for kth inside variable. kth=kthS*(T=Ttrans) But I am getting this error message below. Can you please help me how to get rid of this error. Failed to evaluate expression. - Expression: d(d((-(mod1.ht.k effxx*mod1.Tx*test(mod1.Tx)+mod1.ht.k effyy*mod1.Ty*test(mod1.Ty))*mod1.ht.dz)*(dvol),{test@1}),mod1.Ty) Failed to evaluate variable. - Variable: mod1.ht.k effyy - Defined as: mod1.ht.kyy Failed to evaluate variable. - Variable: mod1.ht.kyy - Defined as: kth Failed to evaluate variable. - Variable: kth - Defined as: (((T=Ttrans))) Failed to evaluate variable. - Variable: T - Geometry: 1 - Domain: 1 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 Mar 28, 2013, 3:12 a.m. EDT
Hi

it looks like it's missing first of all the variable "T" have you defined it ?

if not add it in as a Parameter

--
Good luck
Ivar
Hi it looks like it's missing first of all the variable "T" have you defined it ? if not add it in as a Parameter -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 28, 2013, 2:41 p.m. EDT
Hi Ivar,

Thanks for your quick reply. I am doing heat transfer analysis so "T" should be my output obtain after simulation and after certain value of "T" it will compare whether "T<Ttrans" if not then it supposed to switch to another condition "T>=Ttrans".

If I write kth=kthS+kthL inside variable instead of kth=kthS*(T<Ttrans)+kthL*(T>=Ttrans) in that case I am getting no error. Only I am getting error when introducing with the condition kth=kthS*(T<Ttrans)+kthL*(T>=Ttrans).

I have defined 'Ttrans" in parameter section but did not defined "T" because I supposed to get the value of "T" during simulation.

Can you please help me what changes I supposed to bring to get rid of this error.

Thanks
Hi Ivar, Thanks for your quick reply. I am doing heat transfer analysis so "T" should be my output obtain after simulation and after certain value of "T" it will compare whether "T=Ttrans". If I write kth=kthS+kthL inside variable instead of kth=kthS*(T=Ttrans) in that case I am getting no error. Only I am getting error when introducing with the condition kth=kthS*(T=Ttrans). I have defined 'Ttrans" in parameter section but did not defined "T" because I supposed to get the value of "T" during simulation. Can you please help me what changes I supposed to bring to get rid of this error. 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 Mar 28, 2013, 4:20 p.m. EDT
HI

OK then its the if statement/ Boolean tests, that makes your function spiky and not smooth (non-continuous) this gives issues for the solver when it needs to cross the boundary. What about trying to use a smooted step function to define a smoother, continuous transition, mostly it helps.

Also the later versions have better default settings for the solvers

--
Good luck
Ivar
HI OK then its the if statement/ Boolean tests, that makes your function spiky and not smooth (non-continuous) this gives issues for the solver when it needs to cross the boundary. What about trying to use a smooted step function to define a smoother, continuous transition, mostly it helps. Also the later versions have better default settings for the solvers -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 5, 2013, 7:49 p.m. EDT
Hi Ivar,

Thanks for your valuable comments. I was able to fix the problem. But when I am exporting data as a text file then I am getting kind of random fashion data instead of regular one. Please find the attachment. I have saved data as a text file. Can you help me how I can get the regular data.

Thansk
Hi Ivar, Thanks for your valuable comments. I was able to fix the problem. But when I am exporting data as a text file then I am getting kind of random fashion data instead of regular one. Please find the attachment. I have saved data as a text file. Can you help me how I can get the regular data. Thansk


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 5, 2013, 7:50 p.m. EDT
forgot to attach the data file
forgot to attach the data file

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.