Discussion Forum

how to find the average concentration in 2-D diffusion problem?

Topics: no topics

Thread index  |  Previous thread  |  Next thread  |  Start a new discussion

RSS FeedRSS feed   |   Email notificationsTurn on email notifications   |   3 Replies   Last post: March 10, 2010 6:56am UTC
Xin Jin

Xin Jin

March 8, 2010 5:19pm UTC

how to find the average concentration in 2-D diffusion problem?

Hi,

I have a 2-D dynamic diffusion problem. I would like to know how to compute the average concentration over the 2-D subject?

Thanks in advance,

Xin

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar K

Ivar K
Moderator

March 9, 2010 7:18am UTC in response to Xin Jin

Re: how to find the average concentration in 2-D diffusion problem?

Hi

In a general sens an average value of a variable. let us say "T", is obtained by an integration coupling Variable:

If you integrate "T[K]" over an edge or a surface (boundary), respctively a volume (sub-domain) you get a value of dimensions [K*m], [K*m^2] repsectively [K*m^3], therefore to get the average value you must then divide your integration by the total edge Length, surface Area respectively Volume that is obtained by integrating the value "1" ove the edge, area, or volume, and off you go.

I agree that it could be so much easier if COMSOL wrote out the equation of the integration coupling variables but basically, how I understand it, it's the integration from "0" to "L" of the arc length of your expression "*ds", or a double integral over the boundary (area) of the expression "*ds1*ds2" etc. These integration could also be expressed as related to your reference coordinates, with the start end ending positions of your edge, boundary sub-domain respectively.

Now there is neither no clear explanations how this integration is really performed, I assume it is done in analogy to the "Postprocessing" edge, boundary or sub-doman "integration" functions. In there you have a "smoothing" and an "advanced" sub-tab. The latter allows you to select "summation" over the nodes or an "integration" in both cases you can define the order of the polynomial used to improve the integration value. Just as the smoothing allow you to select how the lower level elements (points w.r.t edges, edges w.r.t surfaces ...) are defined with respect to their neighbors (i.e. a the value of a variable on a point can be averaged over the neibouring edges attached to the point, or the value on an edge from the neighbouring surfaces etc.

At least this is my interpretation of the integration variables, and has been successfull to me so far.

One way to experiment this is to draw a circle if radius "1" in 2D, to mesh it as extremely coarse (I get a dodecagone perifery), to do a "solve get initial values", and have a look at the postprocessng geometrical properties, as well as a bundary integration along the perifery (=2*pi*r) with summation 1st, 2, 4 th order and an integration (the smooting has no effect on a circle like this I believe, use a cople of adjacent squares to play with that functionality).

Note that the "summation" gives you an ordinary sum (and COMSOL does no add the default [m], [m^2 respective [m^3] in the units section). The summation of the circle (=24 as I have a dodecagone from the mesh) is not the sum of the four 1/4 circles or the 4 quadrants (24 <> 4*7=28) because of the 4 common points (28-4=24).
While the integration gives you a value in the correct units and is close to 2*pi, in fact even better if you select a 2nd order intrpolation, than a default "auto" 4the order.

As the help files says, "summation" is typically used for reaction forces.

Hope this helps
Ivar

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Danial Tz

Danial Tz

March 9, 2010 5:14pm UTC in response to Ivar K

Re: how to find the average concentration in 2-D diffusion problem?

Ivar,

Many thanks for the explaination. In line with your explaination and Xin's case, do you know how integrals are calculated over a deformed mesh? and how to find that area to calculate an average?

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar K

Ivar K
Moderator

March 10, 2010 6:56am UTC in response to Danial Tz

Re: how to find the average concentration in 2-D diffusion problem?

Hi

No not in detail, I havent found that in the doc, but you must define on which frame you are calculating, and I expect COMSOL to use the same principles, in each case

normally it remains the integration of "1" over the area, but on the deformed mesh

look carefully on the integration coupling variable GUI, when you add an ALE you get a frame option added in to define on which frame you want to calculate

Good luck
Ivar

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse


Rules and guidelines