CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Species transport in Darcy flow (https://www.cfd-online.com/Forums/openfoam-programming-development/155335-species-transport-darcy-flow.html)

wayne14 June 29, 2015 03:15

Species transport in Darcy flow
 
1 Attachment(s)
Hi everyone,

I am trying to solve a species transport problem in darcy flow. Both viscosity and density depend on the species concentrations.

The equations and my calculation procedure are attached.

My test case is a point leakage at the location (0,0,0). I will post the case and solver here.

Hope you can help me.

Regards,

Wayne

wayne14 June 29, 2015 03:45

4 Attachment(s)
This is the solver and the two test case.

In test case Exo72D2Q0, the source strength is set to 0.
In this case, the air should just pile up without any movement.
The boundary conditions for pressure p seems to be ok now as follows:
Code:

dimensions      [1 -1 -2 0 0 0 0];

internalField  uniform 101.325e3;

boundaryField
{
    frontandback
    {
        type empty;
    }
    walls
    {
        type            zeroGradient;
    }

    up
    {
        type            fixedValue;
        value          uniform 101.325e3;

    }

    down
    {
      type groovyBC;

      variables "gradp=Rho*9.81;";
      gradientExpression "gradp";
      value uniform 101361.69921;
      fractionExpression "0";
    }
}

// ************************************************************************* //


wayne14 June 29, 2015 04:01

2 Attachment(s)
In test case Exo72D2, the source strength for CH4 is
Q Q [1 0 -1 0 0 0 0] 1.48e-5;// kg/s

This time the p still converge very fast, but the concentration (kg/kg) of CH4, 'TS2', would not converge below e-3
The concentration (kg/kg) of CH4 is shown in TS2.jpg and TS2 bigger.jpg.
The biggest problem is that TS2 does not meet the mass balance! Will someone be interested in helping me?

wayne14 June 29, 2015 10:53

It seems that the problem have been solved after I correct the boundary conditions. However, I still wish that you can comment on my solver so that I can develop a better one in the future.

kostnermo September 26, 2016 02:06

Hi Yan,

could you tell me how you corrected the BCs?
I am trying to solve a similar problem at the moment.

Kind regards,

Patrick

wayne14 September 26, 2016 04:12

Quote:

Originally Posted by kostnermo (Post 619239)
Hi Yan,

could you tell me how you corrected the BCs?
I am trying to solve a similar problem at the moment.

Kind regards,

Patrick

Hi Patrick,

I will email you.

Regards,
Yan


All times are GMT -4. The time now is 03:43.