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.

concentration in solute trasnport model

Please login with a confirmed email address before reporting spam

Hi all,

I have a 2D model, coupled Fluid flow with solute transport in order to simulate the nitrate concentration inside my domain.
I have soil column, which the left angle, is river and in the right is ditch. So I imposed two concentration boundary condition. Assuming that there is a flux from left and right inside the domain. Is it correct to impose this type of boundary condition for solute transport?

And when my model run, I calculated the "Nitrate concentration" inside the domain and it seems that sometimes the concentration is negative! Why did I get negative concentration for my species?

Please let me know if my questions are not clear.

Attached my model
Thanks


5 Replies Last Post 5 mar 2015, 03:55 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 27 feb 2015, 01:44 GMT-5
Hi

First, define the units of the arguments and the functions in your interpolation and step functions. Second, express concentrations in mol/l. I am not sure if the units discrepancy has any effect on the calculation, but why not fix them?

Neither I am sure if the right side concentration boundary condition is guilty of your negative concentrations, but somehow it feels wrong, because you nail the concentration in the ditch. I would use inflow and outflow BCs on the left and right. But in your transport node the velocity field is user defined, change that to Darcy's velocity field.

Negative concentrations is a nuisance in convective diffusion problems, I have had them as well. The solution has been to use a denser mesh. I would use fluid dynamics calibrated normal mesh; 30,000 elements is not excessive. The issue of negative concentrations has appeared on this forum repeatedly, and there seems to be no easy solution to that problem.

best of luck
Lasse
Hi First, define the units of the arguments and the functions in your interpolation and step functions. Second, express concentrations in mol/l. I am not sure if the units discrepancy has any effect on the calculation, but why not fix them? Neither I am sure if the right side concentration boundary condition is guilty of your negative concentrations, but somehow it feels wrong, because you nail the concentration in the ditch. I would use inflow and outflow BCs on the left and right. But in your transport node the velocity field is user defined, change that to Darcy's velocity field. Negative concentrations is a nuisance in convective diffusion problems, I have had them as well. The solution has been to use a denser mesh. I would use fluid dynamics calibrated normal mesh; 30,000 elements is not excessive. The issue of negative concentrations has appeared on this forum repeatedly, and there seems to be no easy solution to that problem. best of luck Lasse

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 3 mar 2015, 10:33 GMT-5
Attached my updated model.
Many thanks for help.
Lasse: First, define the units of the arguments and the functions in your interpolation and step functions. Second, express concentrations in mol/l. I am not sure if the units discrepancy has any effect on the calculation, but why not fix them?

I defined the units for the functions.

Lasse: Neither I am sure if the right side concentration boundary condition is guilty of your negative concentrations, but somehow it feels wrong, because you nail the concentration in the ditch. I would use inflow and outflow BCs on the left and right. But in your transport node the velocity field is user defined, change that to Darcy's velocity field.

I defined Darcy's velocity field in "partially saturated porous media". Reason that I defined the boundary conditions as concentration was that there are nitrate concentration both in river and ditch (in left and right part of domain). Assuption is that nitrate concentration are coming from these two regions inside the domain which is floodplain.

I used fluid dynamics calibrated normal mesh.

My question: It seems that concentration inside the domain is always zero, do you have any idea, why?

Your answer will help me alot in my progression of my study.
Thanks
Sepideh
Attached my updated model. Many thanks for help. Lasse: First, define the units of the arguments and the functions in your interpolation and step functions. Second, express concentrations in mol/l. I am not sure if the units discrepancy has any effect on the calculation, but why not fix them? I defined the units for the functions. Lasse: Neither I am sure if the right side concentration boundary condition is guilty of your negative concentrations, but somehow it feels wrong, because you nail the concentration in the ditch. I would use inflow and outflow BCs on the left and right. But in your transport node the velocity field is user defined, change that to Darcy's velocity field. I defined Darcy's velocity field in "partially saturated porous media". Reason that I defined the boundary conditions as concentration was that there are nitrate concentration both in river and ditch (in left and right part of domain). Assuption is that nitrate concentration are coming from these two regions inside the domain which is floodplain. I used fluid dynamics calibrated normal mesh. My question: It seems that concentration inside the domain is always zero, do you have any idea, why? Your answer will help me alot in my progression of my study. Thanks Sepideh


Please login with a confirmed email address before reporting spam

Posted: 9 years ago 3 mar 2015, 14:45 GMT-5
If you integrate concentration over the entire simulation area, you get values > 0. I do not quite understand the combinations

rain(t)*al(F5(t))

or

be(F5(t))

which return wrong units, but it does not appear to harm.

br
Lasse
If you integrate concentration over the entire simulation area, you get values > 0. I do not quite understand the combinations rain(t)*al(F5(t)) or be(F5(t)) which return wrong units, but it does not appear to harm. br Lasse

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 5 mar 2015, 03:42 GMT-5

If you integrate concentration over the entire simulation area, you get values > 0. I do not quite understand the combinations

rain(t)*al(F5(t))

or

be(F5(t))

which return wrong units, but it does not appear to harm.

br
Lasse



Many thanks for reply. I used inlet b.c and pervious layer b.c to impose the mixed boundary condition using two smoothed step function based on this paper: web.stanford.edu/dept/cee/faculty/freyberg/ChuiFreyberg.pdf

But, if I want to calculate the concentration just for one line or a point inside the domain, then how is it possible to calulate the concentration for a special location inside the domain?

Another Question: In "Transport of Diluted Species in porous media" there is an option which is "Advanced Settings": which user can define for the convection term to use 1) Non-conservative form or 2)Conservative form.

My question: If I choose "Conservative form" and try to run my model I will confront with this error: "Failed to evaluate reaction forces at last time step.
Attempt to evaluate negative power of zero.
Function: ^
Failed to evaluate expression."

what does it mean? because I didn't define anything about reaction setting! is it default from comsol to compute the reaction forces in solute tansport?
How is it possible to solve this problem?

Thanks in advance for your help
Sepideh

[QUOTE] If you integrate concentration over the entire simulation area, you get values > 0. I do not quite understand the combinations rain(t)*al(F5(t)) or be(F5(t)) which return wrong units, but it does not appear to harm. br Lasse [/QUOTE] Many thanks for reply. I used inlet b.c and pervious layer b.c to impose the mixed boundary condition using two smoothed step function based on this paper: http://web.stanford.edu/dept/cee/faculty/freyberg/ChuiFreyberg.pdf But, if I want to calculate the concentration just for one line or a point inside the domain, then how is it possible to calulate the concentration for a special location inside the domain? Another Question: In "Transport of Diluted Species in porous media" there is an option which is "Advanced Settings": which user can define for the convection term to use 1) Non-conservative form or 2)Conservative form. My question: If I choose "Conservative form" and try to run my model I will confront with this error: "Failed to evaluate reaction forces at last time step. Attempt to evaluate negative power of zero. Function: ^ Failed to evaluate expression." what does it mean? because I didn't define anything about reaction setting! is it default from comsol to compute the reaction forces in solute tansport? How is it possible to solve this problem? Thanks in advance for your help Sepideh

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 5 mar 2015, 03:55 GMT-5
If you want to evaluate the concentration in a particular point, you have to draw it before solving. The you just use Derived values --> Point evaluation.

If somewhere in the model an expression x^n (x is a variable and n is a non-integer number) is calculated, it usually gives the error message you received. The trick is to write (eps+x)^n; eps is a machine constant, a very small number (look help for "eps"). But I am not familiar with conservative or non-conservative problem settings. You'd better read the manual (or on-line help).

br
Lasse

If you want to evaluate the concentration in a particular point, you have to draw it before solving. The you just use Derived values --> Point evaluation. If somewhere in the model an expression x^n (x is a variable and n is a non-integer number) is calculated, it usually gives the error message you received. The trick is to write (eps+x)^n; eps is a machine constant, a very small number (look help for "eps"). But I am not familiar with conservative or non-conservative problem settings. You'd better read the manual (or on-line help). br Lasse

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.