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.

how to apply boundary conditions around square geometry

Please login with a confirmed email address before reporting spam

Dear Friends,

i am trying to solve PDE in COMSOL and my domain is square.

In first problem my boundary condition is same everywhere around the perimeter of square which is easy to implement in COMSOL.

In second problem boundary condition is varying from point to point it means at the corner of square it is maximum and at the center of edge it is minimum. i know the values of boundary condition at each point but i do not know how to apply these in COMSOL.

Please see attachment for my geometry with boundary conditions.

thanks in advance.

Ricky



4 Replies Last Post 22 feb 2011, 17:04 GMT-5
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 21 feb 2011, 01:42 GMT-5
Hi

you can enter a boundary condition as a value (numerical constant) but also as a function of x, y etc.

If you are in 2D the easiest is to use the default line dimension "s" that COMSOL defines going from 0 to 1 along an edge (in the sens of the arrow seen in edge view mode).

to get a quadratic shape you can write

MyBoundaryCondition = MyMaxValue*s*(1-s)

to normalise it you might want to add a constant such as 4 or 6 depending on what you are looking for (mean or max values)

THis is typically used for laminar flows in a pipe or between two fixed no-slip walls, se the CFD doc

--
Good luck
Ivar
Hi you can enter a boundary condition as a value (numerical constant) but also as a function of x, y etc. If you are in 2D the easiest is to use the default line dimension "s" that COMSOL defines going from 0 to 1 along an edge (in the sens of the arrow seen in edge view mode). to get a quadratic shape you can write MyBoundaryCondition = MyMaxValue*s*(1-s) to normalise it you might want to add a constant such as 4 or 6 depending on what you are looking for (mean or max values) THis is typically used for laminar flows in a pipe or between two fixed no-slip walls, se the CFD doc -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 22 feb 2011, 00:32 GMT-5
Dear Ivar,

Thanks for reply.

I am trying to learn COMSOL because I know this is very good software. I do not know default line dimension. How I am trying to solve this problem, please see attachment for that. I will be very grateful if you help me with this.

Thanks in advance


With regards

Ricky
Dear Ivar, Thanks for reply. I am trying to learn COMSOL because I know this is very good software. I do not know default line dimension. How I am trying to solve this problem, please see attachment for that. I will be very grateful if you help me with this. Thanks in advance With regards Ricky


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 22 feb 2011, 01:54 GMT-5
Hi

you should make a function of the type interpolation, add the data array and call it on the BC data field.

I'm not sure now (would have to test it out and I'm not by my COMSOL computer) how to "send" the dependent variables so either its a myfunct(y) or a myfunction(s)

note that "s" varies from 0 to 1 along the edge in the direction of the arrow so you must normalise the length and your function accordingly. Whyle y takes the value of the element whereever it is positionned along the line

--
Good luck
Ivar
Hi you should make a function of the type interpolation, add the data array and call it on the BC data field. I'm not sure now (would have to test it out and I'm not by my COMSOL computer) how to "send" the dependent variables so either its a myfunct(y) or a myfunction(s) note that "s" varies from 0 to 1 along the edge in the direction of the arrow so you must normalise the length and your function accordingly. Whyle y takes the value of the element whereever it is positionned along the line -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 22 feb 2011, 17:04 GMT-5
Dear Ivar,


Thank you very much.

i will try this method.

with best regards

Ricky
Dear Ivar, Thank you very much. i will try this method. with best regards Ricky

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.