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.

Fluid flow boundary condition: what's the difference between the square bracket and the round bracket?

Please login with a confirmed email address before reporting spam

While studying the laminar flow example model from COMSOL model library, the only part I think I am stuck at is the boundary condition expression:

U_mean*6*s*(1-s)*step1(t[1/s])

What's the meaning of the above expression? I understand what's U_mean - it's a variable defined in the global definition (equal to 0.1 in the tutorial pdf). I also understand the function step1 - it's function again defined in the global definitions (it's a simple step function if the tutorial pdf if followed).

What confuses me is the variable "s" and the square brackets in "step1(t[1/s]). I am assuming "t" is simply the time variable.

Please shed some light if you know.

Regards,

-IMG Comsol

1 Reply Last Post 17.04.2011, 03:36 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 17.04.2011, 03:36 GMT-4
Hi

if you search the Forum, you will find different explanations around these facts, in 2 word (or a bit more;):

all functions wants unitless variable calls, "t" the time has a unit of seconds, to render it unitless we write t[1/s] and expressed in seconds (this will cancel the "orange writing" warning signal rom COMSOL

"s" is an internal variable defined in 2D and running normally from 0 to 1 along EACH Edge=Boundary in 2D.
It also defines the direction of the edge/boundary see the arrows in edge mode. THe direction is important, as the boundary normal (up-normal) points OUTWARDS from the Domain w.rt. the right hand rule i.e. a vertical Edge with an arrow up (+Y) has its normal to the left (-X) direction hence the Domain it belongs to is to the right !

Then s*(1-s) is a parabola starting and finishing at "0" for s=0 and s=1, this is tyspically the velocity flow of a "non-slip" wall condition. If you integrate s*(1-s) between 0 and 1 you will get 1/6 so U_mean*6*s*(1-s)*step1(t[1/s]) gives you the average velocity at step=1.

THe maximum of s*(1-s) is for s=1/2 with a value of 1/4, hence U_peak*4*s*(1-s)*step1(t[1/s]) is the expression for the o-peak or amplitude value of the velocity, when you know thta one.

Note: in 3D it becomes less evident, "s" no longer exist, it's "s1 s2", they do no longer go from 0 to1 as this depends on the boundary shape. In 3D you must revert to normalised absolute values to express your velocity. Often using the cylindrical coordinates eases the expression.

Finally, I (almost) always add inital conditions for my flow, and always start with a little flow, even if the first step might be with v=0, AS WELL as I add alittle pressure drop to initialise the vectors, this has saved me hours of time waiting for the solver to converge, so I find it very useful.

To check your initial conditions, as these become rapidly complex forskewed geoemtries, you can always right-click on the Solver ... Dependent Variables node and select Compute to Selected. This will load the initial conditions from its default values (or a stored solutionif you chain solvers) and then you have a "Data Set" to probe and analse

Take a look at the models and the explanations in the doc, AND in the Model Library (do not forget to update it with the "update command"

--
Have fun Comsoling
Ivar
Hi if you search the Forum, you will find different explanations around these facts, in 2 word (or a bit more;): all functions wants unitless variable calls, "t" the time has a unit of seconds, to render it unitless we write t[1/s] and expressed in seconds (this will cancel the "orange writing" warning signal rom COMSOL "s" is an internal variable defined in 2D and running normally from 0 to 1 along EACH Edge=Boundary in 2D. It also defines the direction of the edge/boundary see the arrows in edge mode. THe direction is important, as the boundary normal (up-normal) points OUTWARDS from the Domain w.rt. the right hand rule i.e. a vertical Edge with an arrow up (+Y) has its normal to the left (-X) direction hence the Domain it belongs to is to the right ! Then s*(1-s) is a parabola starting and finishing at "0" for s=0 and s=1, this is tyspically the velocity flow of a "non-slip" wall condition. If you integrate s*(1-s) between 0 and 1 you will get 1/6 so U_mean*6*s*(1-s)*step1(t[1/s]) gives you the average velocity at step=1. THe maximum of s*(1-s) is for s=1/2 with a value of 1/4, hence U_peak*4*s*(1-s)*step1(t[1/s]) is the expression for the o-peak or amplitude value of the velocity, when you know thta one. Note: in 3D it becomes less evident, "s" no longer exist, it's "s1 s2", they do no longer go from 0 to1 as this depends on the boundary shape. In 3D you must revert to normalised absolute values to express your velocity. Often using the cylindrical coordinates eases the expression. Finally, I (almost) always add inital conditions for my flow, and always start with a little flow, even if the first step might be with v=0, AS WELL as I add alittle pressure drop to initialise the vectors, this has saved me hours of time waiting for the solver to converge, so I find it very useful. To check your initial conditions, as these become rapidly complex forskewed geoemtries, you can always right-click on the Solver ... Dependent Variables node and select Compute to Selected. This will load the initial conditions from its default values (or a stored solutionif you chain solvers) and then you have a "Data Set" to probe and analse Take a look at the models and the explanations in the doc, AND in the Model Library (do not forget to update it with the "update command" -- Have fun Comsoling 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.