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.

can we bound a dependant variable?

Please login with a confirmed email address before reporting spam

Hello,

I use laminar flow plus adding a convection-diffusion equation as a pde one to NV and continuity equations(time- dependant) to solve my simulation. The problem that I have is that the magnitude of variable in convection-diffusion (u2) should be between 0 and 1 but it has overshoot and undershoot (max 1.8 ans min-0.6).

Is there any way to limit the error in each time step of iteration ? I guess these errors come from numerical errors.
As far as I know one of the ways to reduce these errors is to refine the mesh but I am wondering if we could limit the magnitude of the variable by formula in each time step(for instance if u2>1 set it to 1 and if u2<0 set it to 0)

thank you
hooman

1 Reply Last Post 4 avr. 2013, 14:42 UTC−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 4 avr. 2013, 14:42 UTC−4
Hi

there are two most possible causes:

1) postprocessing "smooting" that overshoots, try the plot quality and turn of sequentially both "improvements"

2) a too coarse mesh in the steep gradient region that does not allow to solve the diffusion equations with suffiecient precision, this will also enhance the effect under 1)

Often you can oserve these effects by using mesh grid views, and observing the solution while solving, then some of thesse poor resolution regions pop easily up for you

--
Good luck
Ivar
Hi there are two most possible causes: 1) postprocessing "smooting" that overshoots, try the plot quality and turn of sequentially both "improvements" 2) a too coarse mesh in the steep gradient region that does not allow to solve the diffusion equations with suffiecient precision, this will also enhance the effect under 1) Often you can oserve these effects by using mesh grid views, and observing the solution while solving, then some of thesse poor resolution regions pop easily up for you -- 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.