CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Darcy flow through different porous materials (https://www.cfd-online.com/Forums/openfoam-solving/164959-darcy-flow-through-different-porous-materials.html)

wayne14 January 6, 2016 09:29

Darcy flow through different porous materials
 
3 Attachment(s)
Hi everyone,

I am working on a 1D steady state darcy flow through different porous materials. The solver reads like this:
Code:

    while (simple.loop())
    {
        Info<< "Time = " << runTime.timeName() << nl << endl;

        while (simple.correctNonOrthogonal())
        {
            solve
            (
                fvm::laplacian(k/mu, p)
            );
        }


                U = -k/mu*fvc::grad(p);


        runTime.write();

        Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
            << "  ClockTime = " << runTime.elapsedClockTime() << " s"
            << nl << endl;
    }

The permeability k (four different porous materials) along the distance is shown in the first figure. The piecewise linear distribution of pressure p in the second figure seems reasonable to me. But
Code:

U = -k/mu*fvc::grad(p);
which causes velocity pulses at the interface of adjacent porous materials in the third figure. Is this result physical?

Please give me some advice.

Thank you!
Yan

wayne14 January 6, 2016 23:11

Quote:

Originally Posted by wayne14 (Post 579751)
Hi everyone,

I am working on a 1D steady state darcy flow through different porous materials. The solver reads like this:
Code:

    while (simple.loop())
    {
        Info<< "Time = " << runTime.timeName() << nl << endl;

        while (simple.correctNonOrthogonal())
        {
            solve
            (
                fvm::laplacian(k/mu, p)
            );
        }


        U = -k/mu*fvc::grad(p);


        runTime.write();

        Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
            << "  ClockTime = " << runTime.elapsedClockTime() << " s"
            << nl << endl;
    }

The permeability k (four different porous materials) along the distance is shown in the first figure. The piecewise linear distribution of pressure p in the second figure seems reasonable to me. But
Code:

U = -k/mu*fvc::grad(p);
which causes velocity pulses at the interface of adjacent porous materials in the third figure. Is this result physical?

Please give me some advice.

Thank you!
Yan

Problem solved.

The velocity should be reconstructed from surface flux instead of -k/mu*fvc::grad(p), and fvSchemes need to be set carefully.


All times are GMT -4. The time now is 23:48.