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 condition

Please login with a confirmed email address before reporting spam

Hello,

I want to solve an equation with a time dependent boundary condition. At time 1 I want to set the inlet temperature to say 280 K and solve for the outlet temperature. At time 2 the flow changes direction and I want to set the outlet temperature to 300 K and solve for the inlet temperature.

Is it possible to have a boundary condition for only certain length of time?

Alex

7 Replies Last Post Dec 7, 2011, 1:30 a.m. EST
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 Nov 15, 2011, 3:15 p.m. EST
Hi

use the step or ramp or pulse functions, and make them periodic (see the sub-tabs) or even use a sinus time oscillation velocity. One thing do observe that your functions must be smooth such that COMSOl might estimate their derivatives for the jacobian bilding, else the solver might well not converge for you.

In any case start simple, add a layer by layer. anf finally input and output BCs are rather symmetrical so they mosty allow for bidirectional flow, depends a little on how you set up the BC specifications, keep them simple, in the worts casse you might need to write a few weak espressions yourself

--
Good luck
Ivar
Hi use the step or ramp or pulse functions, and make them periodic (see the sub-tabs) or even use a sinus time oscillation velocity. One thing do observe that your functions must be smooth such that COMSOl might estimate their derivatives for the jacobian bilding, else the solver might well not converge for you. In any case start simple, add a layer by layer. anf finally input and output BCs are rather symmetrical so they mosty allow for bidirectional flow, depends a little on how you set up the BC specifications, keep them simple, in the worts casse you might need to write a few weak espressions yourself -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 15, 2011, 5:22 p.m. EST
Thanks Ivar,

I tried using the ramp and step functions but I want to in fact have a BC at a point at time one and then have that point free with no BC at time two. Maybe I am using the step functions wrong but I am using them to set my BC's to a value (either 0 or 1).

I was to find the option to set them to periodic. Is this in the function subtab?

Alex
Thanks Ivar, I tried using the ramp and step functions but I want to in fact have a BC at a point at time one and then have that point free with no BC at time two. Maybe I am using the step functions wrong but I am using them to set my BC's to a value (either 0 or 1). I was to find the option to set them to periodic. Is this in the function subtab? Alex

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 Nov 16, 2011, 2:43 a.m. EST
Hi

you are right the periodicity seems to have disappeared in my 4.2a now, I do not believe I was dreaming.

But on the other hand there are something new: "Waveforms"
with sawtooth, sine, square, and triangles, these are periodic and smoothed

--
Good luck
Ivar
Hi you are right the periodicity seems to have disappeared in my 4.2a now, I do not believe I was dreaming. But on the other hand there are something new: "Waveforms" with sawtooth, sine, square, and triangles, these are periodic and smoothed -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 25, 2011, 4:35 a.m. EST

I tried using the ramp and step functions but I want to in fact have a BC at a point at time one and then have that point free with no BC at time two. Maybe I am using the step functions wrong but I am using them to set my BC's to a value (either 0 or 1).


Hello everybody,

i think i have a similar problem. I try to displace the surface of a rod linear in time and then release it. What i expect is that the time dependent solution would give me a oscillating displacement. But instead of this i find some small damped oscillating displacements which vanish after extremly short time. The frequency of the displacement is dependent on the time-step of the solver. The boundary condition for the excitation is a prescribed displacement with the function (amplitude/delta_time)*t*(t<excitation_time). I wonder if the function sets displacement=0 after the excitation_time. So my question is: How can i set the boundary free after excitation_time?

Best regards
Thomas
[QUOTE] I tried using the ramp and step functions but I want to in fact have a BC at a point at time one and then have that point free with no BC at time two. Maybe I am using the step functions wrong but I am using them to set my BC's to a value (either 0 or 1). [/QUOTE] Hello everybody, i think i have a similar problem. I try to displace the surface of a rod linear in time and then release it. What i expect is that the time dependent solution would give me a oscillating displacement. But instead of this i find some small damped oscillating displacements which vanish after extremly short time. The frequency of the displacement is dependent on the time-step of the solver. The boundary condition for the excitation is a prescribed displacement with the function (amplitude/delta_time)*t*(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 Dec 1, 2011, 1:58 a.m. EST
Hi

if you use a prescribed displacement it will set the displacement at "0" that is on demand, you should rather use a force to displace it and then release the force, that is what you do in reality, no ?

--
Good luck
Ivar
Hi if you use a prescribed displacement it will set the displacement at "0" that is on demand, you should rather use a force to displace it and then release the force, that is what you do in reality, no ? -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Dec 6, 2011, 6:40 a.m. EST
Thank you, Ivar, for your response!

If i use a boundary load instead of a prescribed displacement i can see the expected oscillation. Now I try simulate the necessary forces for the displacement in step1 with the prescribed displacement and with this results i set up a second calculation with the calculated forces as boundary load. can anyone give me a hint, where i can find information about this procedure?
Thank you, Ivar, for your response! If i use a boundary load instead of a prescribed displacement i can see the expected oscillation. Now I try simulate the necessary forces for the displacement in step1 with the prescribed displacement and with this results i set up a second calculation with the calculated forces as boundary load. can anyone give me a hint, where i can find information about this procedure?

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 Dec 7, 2011, 1:30 a.m. EST
Hi

I believe, if I have understood you well, that you can add a general equation with a Force = AveeageDisp-DesiredDisp

then apply the force to the boundary, calculate the average deformation of your sensor area as an aveop1(u) or whatever, define a parameter for DesiredDisp and let COMSOl adapt the force, you then plot the Force versus displacement.

This is a nice way to apply moments.

If you are not too much concerned of making the load surface "rigid" you might also use a "rigid Connector" and some of its subnodes

This is used typically in solid, but I'm not sure how to introduce it correctly into your FSI problem. You might also drive the input pressure or velocity of your fluid (to get the desired deflection)
--
Good luck
Ivar
Hi I believe, if I have understood you well, that you can add a general equation with a Force = AveeageDisp-DesiredDisp then apply the force to the boundary, calculate the average deformation of your sensor area as an aveop1(u) or whatever, define a parameter for DesiredDisp and let COMSOl adapt the force, you then plot the Force versus displacement. This is a nice way to apply moments. If you are not too much concerned of making the load surface "rigid" you might also use a "rigid Connector" and some of its subnodes This is used typically in solid, but I'm not sure how to introduce it correctly into your FSI problem. You might also drive the input pressure or velocity of your fluid (to get the desired deflection) -- 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.