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.

Flux in Convection and diffusion module : A quick question

Please login with a confirmed email address before reporting spam

Hi,

Is there such flux Lagrange multiplier in this mode, as there is for drag/lift or reacf(u), or I can use nflux_total accurately?

Many thanks

8 Replies Last Post 08.04.2010, 17:58 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 20.03.2010, 06:01 GMT-4
update: the fluxes calculated using ntotalflux are wrong, specially when there is a moving boundary. this is frustrating.
update: the fluxes calculated using ntotalflux are wrong, specially when there is a moving boundary. this is frustrating.

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.03.2010, 06:53 GMT-4
Hi

Is it possible to be slightly more explicit about your model ?

such as version, application mode name, minimum model info, BC, ...

It would make life slightly easer for us to understand and perhaps come with a suggestion, or just learn something ourselves.

Have fun with COMSOL
Ivar
Hi Is it possible to be slightly more explicit about your model ? such as version, application mode name, minimum model info, BC, ... It would make life slightly easer for us to understand and perhaps come with a suggestion, or just learn something ourselves. Have fun with COMSOL Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 21.03.2010, 13:47 GMT-4
Hi Ivar,

My question is simple and general.

How can I calculate the mass flux going inside a subdomain accurately?

when I activate non-ideal weak mode for "convection and diffusion", say lm3, I can not integrate it, like I do with "drag coefficient" in "cylinder in the flow" case.

I am using comsol 3.5a, and modeling an oscillating cylinder (ALE) in the flow with reaction inside the cylinder, as a benchmark test. It is just the comsol "cylinder in the flow", but oscillating one, and reaction happening inside.

Many thanks in advance
Hi Ivar, My question is simple and general. How can I calculate the mass flux going inside a subdomain accurately? when I activate non-ideal weak mode for "convection and diffusion", say lm3, I can not integrate it, like I do with "drag coefficient" in "cylinder in the flow" case. I am using comsol 3.5a, and modeling an oscillating cylinder (ALE) in the flow with reaction inside the cylinder, as a benchmark test. It is just the comsol "cylinder in the flow", but oscillating one, and reaction happening inside. Many thanks in advance

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.03.2010, 04:33 GMT-4
Hi

If I record correctly, lagrange multipliers "lm"s are defined on the nodes and should be "summed" and not integrated, have you tried the posprocessing BC "advanced" feature ? I cannot remember now if they are "automatically" summed rather than integrated.

Good luck
Ivar
Hi If I record correctly, lagrange multipliers "lm"s are defined on the nodes and should be "summed" and not integrated, have you tried the posprocessing BC "advanced" feature ? I cannot remember now if they are "automatically" summed rather than integrated. Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 22.03.2010, 13:27 GMT-4

Hi

If I record correctly, lagrange multipliers "lm"s are defined on the nodes and should be "summed" and not integrated, have you tried the posprocessing BC "advanced" feature ? I cannot remember now if they are "automatically" summed rather than integrated.

Good luck
Ivar


Dear Ivar,

They are automatically summed. correct. However, Comsol doesn't let me do any summation/integration on the boundaries for lm of convection & diffusion. So, still the question is how to find flux?
[QUOTE] Hi If I record correctly, lagrange multipliers "lm"s are defined on the nodes and should be "summed" and not integrated, have you tried the posprocessing BC "advanced" feature ? I cannot remember now if they are "automatically" summed rather than integrated. Good luck Ivar [/QUOTE] Dear Ivar, They are automatically summed. correct. However, Comsol doesn't let me do any summation/integration on the boundaries for lm of convection & diffusion. So, still the question is how to find flux?

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 22.03.2010, 13:33 GMT-4
Here is an idea that might help under some special circumstances:
You can use the divergence theorem and re-express your boundary flux as a domain integral which you can calculate easily. Catch is, this way you cannot figure out individual boundary contributions; what you get is the total net flux across all boundaries enclosing your domain.

Even in cases when boundary integrals are calculable, domain integral is supposed to be more accurate so this should be the preferred way of calculating total net flux across boundaries.

By the way, I noticed you are talking about flux across moving boundaries. Not sure how COMSOL implementation is but mathematically this requires caution too. For example convective flux of a scalar quantity b is [b*n dot (v-vb)] where n is unit normal and v and vb are velocity vectors of the fluid and moving boundary with respect to a fixed eulerian frame. That is, you should check to see how it is implemented and account for this boundary "sweeping" effect.

Good luck
Ozgur
Here is an idea that might help under some special circumstances: You can use the divergence theorem and re-express your boundary flux as a domain integral which you can calculate easily. Catch is, this way you cannot figure out individual boundary contributions; what you get is the total net flux across all boundaries enclosing your domain. Even in cases when boundary integrals are calculable, domain integral is supposed to be more accurate so this should be the preferred way of calculating total net flux across boundaries. By the way, I noticed you are talking about flux across moving boundaries. Not sure how COMSOL implementation is but mathematically this requires caution too. For example convective flux of a scalar quantity b is [b*n dot (v-vb)] where n is unit normal and v and vb are velocity vectors of the fluid and moving boundary with respect to a fixed eulerian frame. That is, you should check to see how it is implemented and account for this boundary "sweeping" effect. Good luck Ozgur

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 23.03.2010, 02:42 GMT-4
Hi

Correct to point out the subtilities to consider with moving boundaries, I overlooked that one, some interesting references in this domain are for me:

Principles of computational Fluid Dynamicsby P. Wesseling, Springer 2009 (soft) and

Computational Fluid Mechanics and heat Transfer, by J.C. Tannehill, D.A. Anderson, R.H. Pletcher, Tylor&Fletcher, 1997

Have a nice reading
Ivar
Hi Correct to point out the subtilities to consider with moving boundaries, I overlooked that one, some interesting references in this domain are for me: Principles of computational Fluid Dynamicsby P. Wesseling, Springer 2009 (soft) and Computational Fluid Mechanics and heat Transfer, by J.C. Tannehill, D.A. Anderson, R.H. Pletcher, Tylor&Fletcher, 1997 Have a nice reading Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 08.04.2010, 17:58 GMT-4
It seems that nobody, even the support, knows how to calculate the flux using the weak form (lagrange multipliers), nor reacf() form.

Just to make sure one last time, does anybody know how to calculate flux in convection-diffusion using LMs or reacf()?



ps. reacf(c) always gives zero value (weak form is off)
It seems that nobody, even the support, knows how to calculate the flux using the weak form (lagrange multipliers), nor reacf() form. Just to make sure one last time, does anybody know how to calculate flux in convection-diffusion using LMs or reacf()? ps. reacf(c) always gives zero value (weak form is off)

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.