CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Foam::error::printStack(Foam::Ostream&) with interFoam -parallel

Register Blogs Community New Posts Updated Threads Search

Like Tree13Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2018, 17:57
Default
  #21
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Could you define "not that good"? Residual plots depend on the script you have used for plotting, on a simulation, on the final aim of your simulations.

Pictures you have posted: 1e-2 for pressure, usually it is not enough.
alexeym is offline   Reply With Quote

Old   May 27, 2019, 06:27
Default Foam::error::printStack(Foam::Ostream&) with interDyMFoam -parallel
  #22
New Member
 
Tewodros Meless Teshome
Join Date: Apr 2018
Posts: 9
Rep Power: 8
teddymett is on a distinguished road
Dear All,

I am using interDyMFoam solver for raceway pond hydrodynamic simulation with water at the bottom and air above. As you may know raceway pond, it is circulating flow channel with a rotating paddle-wheel as source of momentum. The solver runs in parallel(HPC) perfectly for my mesh in its native form. I then added scalar transport by setting spherical numerical tracer material in the water phase using setFields. Based on the information I got on the site https://www.openfoam.com/documentati...Transport.html, I have added a function on the controlDict that integrates scalar transport of material with the main solver. I have also added some lines of codes on fvSolution and fvScheme to introduce the transported material. The simulation goes on up to a certain time (8.6 seconds) and crash with the following error. I appreciate if you could help me to solve this problem. For your reference I have attached the files of my case.
Attached Files
File Type: c error.c (8.6 KB, 9 views)
File Type: c controlDict.c (2.3 KB, 5 views)
File Type: c fvSchemes.c (1.6 KB, 1 views)
File Type: c fvSolution.c (2.2 KB, 2 views)
File Type: c boundary.c (1.2 KB, 5 views)
teddymett is offline   Reply With Quote

Old   May 27, 2019, 06:47
Default Foam::error::printStack(Foam::Ostream&) with interDyMFoam -parallel
  #23
New Member
 
Tewodros Meless Teshome
Join Date: Apr 2018
Posts: 9
Rep Power: 8
teddymett is on a distinguished road
Dear All,

If the attachments in my previous post are not so convenient, I put them again in the code below adding setFieldsDict and dynamicMeshDict and . As you can see the error startd at writing the scalar transport output.

Best regards,

error message,

Code:
PIMPLE: iteration 3
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.3974883  Min(alpha.water) = -0.0002821722  Max(alpha.water) = 1.000014
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.3974882  Min(alpha.water) = -0.0002527684  Max(alpha.water) = 1.000014
smoothSolver:  Solving for Ux, Initial residual = 0.0003973392, Final residual = 2.742839e-08, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.0001254303, Final residual = 4.915543e-07, No Iterations 1
smoothSolver:  Solving for Uz, Initial residual = 0.001211739, Final residual = 7.517233e-08, No Iterations 2
GAMG:  Solving for p_rgh, Initial residual = 0.002028651, Final residual = 9.083885e-07, No Iterations 93
time step continuity errors : sum local = 2.530597e-06, global = 2.492304e-06, cumulative = 0.0002797818
smoothSolver:  Solving for epsilon, Initial residual = 0.001153315, Final residual = 9.277986e-08, No Iterations 2
smoothSolver:  Solving for k, Initial residual = 0.0006689293, Final residual = 6.277481e-08, No Iterations 2
ExecutionTime = 540.51 s  ClockTime = 542 s

scalarTransport write:
smoothSolver:  Solving for A, Initial residual = 0.0008378552, Final residual = 5.522432e-07, No Iterations 3

Courant Number mean: 0.05958578 max: 2.47276
Interface Courant Number mean: 0.004201403 max: 0.960489
deltaT = 0.001710081
Time = 8.965798384

PIMPLE: iteration 1
AMI: Creating addressing and weights between 25480 source faces and 25480 target faces
AMI: Patch source sum(weights) min/max/average = 0.8927344, 2.243641, 1.006844
AMI: Patch target sum(weights) min/max/average = 0.8722569, 2.42203, 1.006609
Execution time for mesh.update() = 0.2 s
GAMG:  Solving for pcorr, Initial residual = 1, Final residual = 0.07917045, No Iterations 13
time step continuity errors : sum local = 3.449466e-06, global = 2.747742e-06, cumulative = 0.0002825295
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.3974882  Min(alpha.water) = -0.000219808  Max(alpha.water) = 1.002122
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.397488  Min(alpha.water) = -0.0001936517  Max(alpha.water) = 1.004385
smoothSolver:  Solving for Ux, Initial residual = 0.000923795, Final residual = 9.940696e-08, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.0002270659, Final residual = 2.03104e-08, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 0.002263035, Final residual = 2.057593e-07, No Iterations 2
GAMG:  Solving for p_rgh, Initial residual = 0.03989121, Final residual = 7.967211e-07, No Iterations 64
time step continuity errors : sum local = 1.375918e-06, global = 1.341233e-06, cumulative = 0.0002838708
PIMPLE: iteration 2
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.397488  Min(alpha.water) = -0.0002225195  Max(alpha.water) = 1.000031
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.3974878  Min(alpha.water) = -0.0001977482  Max(alpha.water) = 1.000026
smoothSolver:  Solving for Ux, Initial residual = 0.0005207693, Final residual = 3.869468e-08, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.0001784677, Final residual = 6.247769e-07, No Iterations 1
smoothSolver:  Solving for Uz, Initial residual = 0.001674928, Final residual = 9.755823e-08, No Iterations 2
GAMG:  Solving for p_rgh, Initial residual = 0.005729367, Final residual = 6.897294e-07, No Iterations 89
time step continuity errors : sum local = 2.763071e-06, global = 2.734495e-06, cumulative = 0.0002866053
PIMPLE: iteration 3
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.397488  Min(alpha.water) = -0.0002228894  Max(alpha.water) = 1.000014
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.3974877  Min(alpha.water) = -0.0001972579  Max(alpha.water) = 1.000014
smoothSolver:  Solving for Ux, Initial residual = 0.000398232, Final residual = 2.746796e-08, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.0001253007, Final residual = 4.530359e-07, No Iterations 1
smoothSolver:  Solving for Uz, Initial residual = 0.001214845, Final residual = 7.441225e-08, No Iterations 2
GAMG:  Solving for p_rgh, Initial residual = 0.001930529, Final residual = 9.771864e-07, No Iterations 85
time step continuity errors : sum local = 2.612538e-06, global = 2.572541e-06, cumulative = 0.0002891778
smoothSolver:  Solving for epsilon, Initial residual = 0.001157704, Final residual = 9.530448e-08, No Iterations 2
smoothSolver:  Solving for k, Initial residual = 0.0006695991, Final residual = 6.323726e-08, No Iterations 2
ExecutionTime = 557.9 s  ClockTime = 560 s

scalarTransport write:
[4] #0  Foam::error::printStack(Foam::Ostream&)--------------------------------------------------------------------------
A process has executed an operation involving a call to the
"fork()" system call to create a child process.  Open MPI is currently
operating in a condition that could result in memory corruption or
other system errors; your job may hang, crash, or produce silent
data corruption.  The use of fork() (or system() or other calls that
create child processes) is strongly discouraged.

The process that invoked fork was:

  Local host:          [[6526,1],4] (PID 63703)

If you are *absolutely sure* that your application will successfully
and correctly survive a call to fork(), you may disable this warning
by setting the mpi_warn_on_fork MCA parameter to 0.
--------------------------------------------------------------------------
 at ??:?
[4] #1  Foam::sigFpe::sigHandler(int) at ??:?
[4] #2  ? in "/lib64/libc.so.6"
[4] #3  Foam::symGaussSeidelSmoother::smooth(Foam::word const&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::Field<double> const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, unsigned char, int) at ??:?
[4] #4  Foam::symGaussSeidelSmoother::smooth(Foam::Field<double>&, Foam::Field<double> const&, unsigned char, int) const at ??:?
[4] #5  Foam::smoothSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
[4] #6  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:?
[4] #7  Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
[4] #8  Foam::functionObjects::scalarTransport::execute() at ??:?
[4] #9  Foam::functionObjects::timeControl::execute() at ??:?
[4] #10  Foam::functionObjectList::execute() at ??:?
[4] #11  Foam::Time::run() const at ??:?
[4] #12  ? at ??:?
[4] #13  __libc_start_main in "/lib64/libc.so.6"
[4] #14  ? at ??:?
[hpc-n663:63703] *** Process received signal ***
[hpc-n663:63703] Signal: Floating point exception (8)
[hpc-n663:63703] Signal code:  (-6)
[hpc-n663:63703] Failing at address: 0x16810000f8d7
[hpc-n663:63703] [ 0] /lib64/libc.so.6(+0x36280)[0x2af991f61280]
[hpc-n663:63703] [ 1] /lib64/libc.so.6(gsignal+0x37)[0x2af991f61207]
[hpc-n663:63703] [ 2] /lib64/libc.so.6(+0x36280)[0x2af991f61280]
[hpc-n663:63703] [ 3] /usr/local/openfoam/OpenFOAM-5.0/platforms/linux64IccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam22symGaussSeidelSmoother6smoothERKNS_4wordERNS_5FieldIdEERKNS_9lduMatrixERKS5_RKNS_10FieldFieldIS4_dEERKNS_8UPtrListIKNS_17lduInterfaceFieldEEEhi+0x855)[0x2af990b8c045]
[hpc-n663:63703] [ 4] /usr/local/openfoam/OpenFOAM-5.0/platforms/linux64IccDPInt32Opt/lib/libOpenFOAM.so(_ZNK4Foam22symGaussSeidelSmoother6smoothERNS_5FieldIdEERKS2_hi+0x26)[0x2af990b8b7e6]
[hpc-n663:63703] [ 5] /usr/local/openfoam/OpenFOAM-5.0/platforms/linux64IccDPInt32Opt/lib/libOpenFOAM.so(_ZNK4Foam12smoothSolver5solveERNS_5FieldIdEERKS2_h+0x4c5)[0x2af990b82535]
[hpc-n663:63703] [ 6] /usr/local/openfoam/OpenFOAM-5.0/platforms/linux64IccDPInt32Opt/lib/libfiniteVolume.so(_ZN4Foam8fvMatrixIdE15solveSegregatedERKNS_10dictionaryE+0x3c6)[0x2af98c8ee496]
[hpc-n663:63703] [ 7] interDyMFoam(_ZN4Foam8fvMatrixIdE5solveERKNS_10dictionaryE+0x329)[0x4bc869]
[hpc-n663:63703] [ 8] /usr/local/openfoam/OpenFOAM-5.0/platforms/linux64IccDPInt32Opt/lib/libsolverFunctionObjects.so(_ZN4Foam15functionObjects15scalarTransport7executeEv+0xa8a)[0x2af9b4a429aa]
[hpc-n663:63703] [ 9] /usr/local/openfoam/OpenFOAM-5.0/platforms/linux64IccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam15functionObjects11timeControl7executeEv+0x3d)[0x2af990b218ed]
[hpc-n663:63703] [10] /usr/local/openfoam/OpenFOAM-5.0/platforms/linux64IccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam18functionObjectList7executeEv+0x85)[0x2af990b0fe95]
[hpc-n663:63703] [11] /usr/local/openfoam/OpenFOAM-5.0/platforms/linux64IccDPInt32Opt/lib/libOpenFOAM.so(_ZNK4Foam4Time3runEv+0xe4)[0x2af990b293e4]
[hpc-n663:63703] [12] interDyMFoam[0x43a90f]
[hpc-n663:63703] [13] /lib64/libc.so.6(__libc_start_main+0xf5)[0x2af991f4d3d5]
[hpc-n663:63703] [14] interDyMFoam[0x430069]
[hpc-n663:63703] *** End of error message ***
controlDict

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     interDyMFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         30;

deltaT          0.0001;

writeControl    adjustableRunTime;

writeInterval   0.1;

purgeWrite      0;

writeFormat     ascii;

writePrecision  7;

writeCompression uncompressed;

timeFormat      general;

timePrecision   10;

runTimeModifiable yes;

adjustTimeStep  yes;

maxCo           2.5;

maxAlphaCo      1;

maxDeltaT       1;

//libs	( "libturbulenceModels.dll" "libfvOptions.dll" "libturbulenceModelSchemes.dll" );

functions
{
    ATransport
    {
        type            scalarTransport;
        libs            ("libsolverFunctionObjects.so");

        enabled         true;
        writeControl    adjustableRunTime;
        writeInterval   0.1;

        field           A;
        bounded01       false;
        phase           alpha.water;

        write           true;

        /*  fvOptions
        {
             unitySource
            {
                type            scalarSemiImplicitSource;
                enabled         true;

                scalarSemiImplicitSourceCoeffs
                {
                    selectionMode   all;
                    volumeMode      specific;
                    injectionRateSuSp
                    {
                        A           (1 0);
                    }
                }
            } 
        }  */

        resetOnStartUp  false;
    }
}
fvSchemes

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         Gauss linear;
    grad(U)         cellLimited Gauss linear 1;
}

divSchemes
{
    div(rhoPhi,U)  Gauss linearUpwind grad(U);
    div(phi,alpha)  Gauss vanLeer;
	div(phi,A)  Gauss vanLeer;
    div(phirb,alpha) Gauss linear;
    div(phid1,p_rgh) Gauss upwind;
    div(phid2,p_rgh) Gauss upwind;
    div(rhoPhi,T)  Gauss linearUpwind unlimited;
    div(rhoPhi,K)  Gauss upwind;
    div(phi,k)  Gauss upwind;
    div(phi,epsilon) Gauss upwind;
    div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear limited corrected 0.33;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         limited corrected 0.33;
}
fvSolution

HTML Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    "alpha.water.*"
    {
        nAlphaCorr          1;
        nAlphaSubCycles     2;
        cAlpha              1;
    }
	
	"A.*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
		nACorr          1;
        nASubCycles     2;
        cA              1;
		tolerance       1e-6;
        relTol          0;
        nSweeps         1;
    }

    p_rgh
    {
        solver          GAMG;
        tolerance       1e-6;
        relTol          0.02;
        smoother        GaussSeidel;
    }

    "pcorr.*"
    {
        $p_rgh;
        tolerance       0.1;
        relTol          0;
    }

    p_rghFinal
    {
        $p_rgh;
        relTol          0;
    }

    ".*(rho|rhoFinal)"
    {
        solver          diagonal;
    }

    "(U|T|k|epsilon).*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-6;
        relTol          0;
        nSweeps         1;
    }
}

PIMPLE
{
    momentumPredictor   yes;
    correctPhi          yes;
    nOuterCorrectors    3;
    nCorrectors         1;
    nNonOrthogonalCorrectors 0;
	pRefPoint           (0.1 0.4 0.75);
    pRefValue           0;
}

relaxationFactors
{
    
    equations
    {
        "U.*"           0.2;
        "k.*"           0.2;
        "epsilon.*"     0.2;
        "T.*"           0.2;
    }
}
boundary

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5.0                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

6
(
    bottom
    {
        type            wall;
        nFaces          38836;
        startFace       3028972;
    }
    walls
    {
        type            wall;
        nFaces          43028;
        startFace       3067808;
    }
    topOne
    {
        type            wall;
        nFaces          2928;
        startFace       3110836;
    }
    paddle
    {
        type            wall;
        inGroups        
2
(
meshedWalls
wall
)
;
        nFaces          23308;
        startFace       3113764;
    }
    AMI1
    {
        type            cyclicAMI;
        inGroups        
2
(
cyclicAMI
rotating
)
;
        nFaces          25480;
        startFace       3137072;
        matchTolerance  0.0001;
        transform       noOrdering;
        neighbourPatch  AMI2;
    }
    AMI2
    {
        type            cyclicAMI;
        inGroups        
2
(
cyclicAMI
rotating
)
;
        nFaces          25480;
        startFace       3162552;
        matchTolerance  0.0001;
        transform       noOrdering;
        neighbourPatch  AMI1;
    }
)
setFieldsDict

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

defaultFieldValues
(
    volScalarFieldValue alpha.water 0
	volScalarFieldValue A 0
);

regions
(
    boxToCell
    {
        box (-0.2 -0.2 0) (0.2 1.5 0.2);
        fieldValues
        (
            volScalarFieldValue alpha.water 1
        );
    }
	sphereToCell 
	{ 
		centre (0.0 -0.15 0.1); 
		radius 0.04 ; 
		fieldValues 
		( 
			volScalarFieldValue A 100 
		) ; 
	}
);
dynamicMeshDict

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh   dynamicMotionSolverFvMesh;

motionSolverLibs ( "libfvMotionSolvers.so" );

motionSolver    solidBody;

cellZone        rotating;

solidBodyMotionFunction  rotatingMotion;

origin        (0.1 0.41 0.39);
axis          (1 0 0);
omega         1.12; //10.758rpm
teddymett is offline   Reply With Quote

Old   May 27, 2019, 08:06
Default
  #24
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

You can try starting with a change. This

Code:
	"A.*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
		nACorr          1;
        nASubCycles     2;
        cA              1;
		tolerance       1e-6;
        relTol          0;
        nSweeps         1;
    }
into this

Code:
    A
    {
        solver PBiCGStab;
        preconditioned DILU;
        relTol 0.1;
        tolerance 1e-6;
    }

    AFinal
    {
        $A;
        relTol 0;
    }
You have copied certain settings from alpha solver, which are not quite applicable to A.
alexeym is offline   Reply With Quote

Old   May 27, 2019, 09:44
Default Foam::error::printStack(Foam::Ostream&) with interDyMFoam -parallel
  #25
New Member
 
Tewodros Meless Teshome
Join Date: Apr 2018
Posts: 9
Rep Power: 8
teddymett is on a distinguished road
Dear Alexeym,

I thank you so much for your answer. I changed the fvSolution as you suggested only changing,
preconditioned DILU;
by
preconditioner DILU;

But another error shown below is facing me, which I couldn't solve. Kindly asking your help again.

Best regards,

fvSolution

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    "alpha.water.*"
    {
        nAlphaCorr          1;
        nAlphaSubCycles     2;
        cAlpha              1;
    }
	
    A
    {
        solver PBiCGStab;
        preconditioner DILU;
        relTol 0.1;
        tolerance 1e-6;
    }

    AFinal
    {
        $A;
        relTol 0;
    }
	
    p_rgh
    {
        solver          GAMG;
        tolerance       1e-6;
        relTol          0.02;
        smoother        GaussSeidel;
    }

    "pcorr.*"
    {
        $p_rgh;
        tolerance       0.1;
        relTol          0;
    }

    p_rghFinal
    {
        $p_rgh;
        relTol          0;
    }

    ".*(rho|rhoFinal)"
    {
        solver          diagonal;
    }

    "(U|T|k|epsilon).*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-6;
        relTol          0;
        nSweeps         1;
    }
}

PIMPLE
{
    momentumPredictor   yes;
    correctPhi          yes;
    nOuterCorrectors    3;
    nCorrectors         1;
    nNonOrthogonalCorrectors 0;
	pRefPoint           (0.1 0.4 0.75);
    pRefValue           0;
}

relaxationFactors
{
    
    equations
    {
        "U.*"           0.2;
        "k.*"           0.2;
        "epsilon.*"     0.2;
        "T.*"           0.2;
    }
}
error

Code:
PIMPLE: iteration 3
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.3974823  Min(alpha.water) = -2.33499e-06  Max(alpha.water) = 1.00003
MULES: Solving for alpha.water
Phase-1 volume fraction = 0.3974821  Min(alpha.water) = -1.810897e-06  Max(alpha.water) = 1.000029
smoothSolver:  Solving for Ux, Initial residual = 0.0002887774, Final residual = 7.406697e-07, No Iterations 1
smoothSolver:  Solving for Uy, Initial residual = 9.182542e-05, Final residual = 2.276457e-07, No Iterations 1
smoothSolver:  Solving for Uz, Initial residual = 0.0008774326, Final residual = 3.919634e-08, No Iterations 2
GAMG:  Solving for p_rgh, Initial residual = 0.001280143, Final residual = 9.924025e-07, No Iterations 54
time step continuity errors : sum local = 1.642548e-06, global = 1.615509e-06, cumulative = 5.728883e-06
smoothSolver:  Solving for epsilon, Initial residual = 0.0008488738, Final residual = 3.865637e-08, No Iterations 2
smoothSolver:  Solving for k, Initial residual = 0.0005139402, Final residual = 2.956443e-08, No Iterations 2
ExecutionTime = 18.15 s  ClockTime = 19 s

scalarTransport write:
[2] #0  [4] #0  Foam::error::printStack(Foam::Ostream&)[8] #0  Foam::error::printStack(Foam::Ostream&)[10] #0  Foam::error::printStack(Foam::Ostream&)[12] #0  Foam::error::printStack(Foam::Ostream&)[14] #0  Foam::error::printStack(Foam::Ostream&)[16] #0  Foam::error::printStack(Foam::Ostream&)[18] #0  Foam::error::printStack(Foam::Ostream&)[20] #0  Foam::error::printStack(Foam::Ostream&)[0] #0  Foam::error::printStack(Foam::Ostream&)[1] #0  [3] #0  Foam::error::printStack(Foam::Ostream&)[5] #0  [6] #0  Foam::error::printStack(Foam::Ostream&)[7] #0  [9] #0  [11] #0  Foam::error::printStack(Foam::Ostream&)[13] #0  Foam::error::printStack(Foam::Ostream&)[15] #0  Foam::error::printStack(Foam::Ostream&)[17] #0  Foam::error::printStack(Foam::Ostream&)[19] #0  Foam::error::printStack(Foam::Ostream&)[21] #0  Foam::error::printStack(Foam::Ostream&)--------------------------------------------------------------------------
A process has executed an operation involving a call to the
"fork()" system call to create a child process.  Open MPI is currently
operating in a condition that could result in memory corruption or
other system errors; your job may hang, crash, or produce silent
data corruption.  The use of fork() (or system() or other calls that
create child processes) is strongly discouraged.

The process that invoked fork was:

  Local host:          [[54505,1],10] (PID 247819)

If you are *absolutely sure* that your application will successfully
and correctly survive a call to fork(), you may disable this warning
by setting the mpi_warn_on_fork MCA parameter to 0.
--------------------------------------------------------------------------
Foam::error::printStack(Foam::Ostream&)Foam::error::printStack(Foam::Ostream&)Foam::error::printStack(Foam::Ostream&)Foam::error::printStack(Foam::Ostream&)Foam::error::printStack(Foam::Ostream&)[22] #0  Foam::error::printStack(Foam::Ostream&)[43] #0  [23] #0  Foam::error::printStack(Foam::Ostream&)[44] #0  Foam::error::printStack(Foam::Ostream&)[24] #0  Foam::error::printStack(Foam::Ostream&)[45] #0  Foam::error::printStack(Foam::Ostream&)[25] #0  Foam::error::printStack(Foam::Ostream&)[46] #0  Foam::error::printStack(Foam::Ostream&)[26] #0  Foam::error::printStack(Foam::Ostream&)[47] #0  Foam::error::printStack(Foam::Ostream&)[27] #0  Foam::error::printStack(Foam::Ostream&)[48] #0  Foam::error::printStack(Foam::Ostream&)[28] #0  Foam::error::printStack(Foam::Ostream&)[49] #0  Foam::error::printStack(Foam::Ostream&)[29] #0  Foam::error::printStack(Foam::Ostream&)[50] #0  Foam::error::printStack(Foam::Ostream&)[30] #0  Foam::error::printStack(Foam::Ostream&)[51] #0  Foam::error::printStack(Foam::Ostream&)[31] #0  Foam::error::printStack(Foam::Ostream&)[52] #0  Foam::error::printStack(Foam::Ostream&)[32] #0  Foam::error::printStack(Foam::Ostream&)[53] #0  Foam::error::printStack(Foam::Ostream&)[33] #0  Foam::error::printStack(Foam::Ostream&)[54] #0  Foam::error::printStack(Foam::Ostream&)[34] #0  Foam::error::printStack(Foam::Ostream&)[55] #0  Foam::error::printStack(Foam::Ostream&)[35] #0  Foam::error::printStack(Foam::Ostream&)[56] #0  Foam::error::printStack(Foam::Ostream&)[37] #0  Foam::error::printStack(Foam::Ostream&)[58] #0  Foam::error::printStack(Foam::Ostream&)[38] #0  Foam::error::printStack(Foam::Ostream&)[59] #0  Foam::error::printStack(Foam::Ostream&)[39] #0  Foam::error::printStack(Foam::Ostream&)[61] #0  Foam::error::printStack(Foam::Ostream&)[40] #0  Foam::error::printStack(Foam::Ostream&)[62] #0  Foam::error::printStack(Foam::Ostream&)[41] #0  Foam::error::printStack(Foam::Ostream&)[63] #0  Foam::error::printStack(Foam::Ostream&)[42] #0  Foam::error::printStack(Foam::Ostream&)Foam::error::printStack(Foam::Ostream&)[36] #0  Foam::error::printStack(Foam::Ostream&)[57] #0  Foam::error::printStack(Foam::Ostream&)[60] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
 at ??:?
 at ??:?
 at ??:?
 at ??:?
 at ??:?
[4] #1  Foam::sigFpe::sigHandler(int)[20] #1  Foam::sigFpe::sigHandler(int) at ??:?
[21] #1  Foam::sigFpe::sigHandler(int) at ??:?
[1] #1  Foam::sigFpe::sigHandler(int) at ??:?
[2] #1  Foam::sigFpe::sigHandler(int) at ??:?
[3] #1  Foam::sigFpe::sigHandler(int)[0] #1  Foam::sigFpe::sigHandler(int) at ??:?
[9] #1  Foam::sigFpe::sigHandler(int) at ??:?
[5] #1  Foam::sigFpe::sigHandler(int) at ??:?
[8] #1  Foam::sigFpe::sigHandler(int) at ??:?
[7] #1  Foam::sigFpe::sigHandler(int) at ??:?
[10] #1  Foam::sigFpe::sigHandler(int) at ??:?
[11] #1  Foam::sigFpe::sigHandler(int)[6] #1  Foam::sigFpe::sigHandler(int) at ??:?
[13] #1  Foam::sigFpe::sigHandler(int) at ??:?
[14] #1  Foam::sigFpe::sigHandler(int) at ??:?
[15] #1  Foam::sigFpe::sigHandler(int) at ??:?
[16] #1  Foam::sigFpe::sigHandler(int) at ??:?
[17] #1  Foam::sigFpe::sigHandler(int)[12] #1  Foam::sigFpe::sigHandler(int) at ??:?
[19] #1  Foam::sigFpe::sigHandler(int)[18] #1  Foam::sigFpe::sigHandler(int) at ??:?
[20] #2  ? at ??:?
 at ??:?
[4] #2  ? at ??:?
 at ??:?
 at ??:?
[6] #2  ? at ??:?
 at ??:?
[10] #2  ? at ??:?
 at ??:?
 at ??:?
 at ??:?
 at ??:?
 at ??:?
[7] #2  ? at ??:?
 at ??:?
[21] #2  ? at ??:?
 at ??:?
[2] #2  ? at ??:?
[16] #2  ? at ??:?
 at ??:?
 at ??:?
 at ??:?
 at ??:?
 at ??:?
[19] #2  ? at ??:?
[0] #2  ? at ??:?
 at ??:?
[14] #2  ?[60] #1  Foam::sigFpe::sigHandler(int) at ??:?
[18] #2  ? at ??:?
 at ??:?
[13] #2  ? at ??:?
[17] #2  ?[46] #1  Foam::sigFpe::sigHandler(int) at ??:?
[1] #2  ? at ??:?
[3] #2  ? at ??:?
[9] #2  ? at ??:?
[5] #2  ? at ??:?
[8] #2  ? at ??:?
[11] #2  ? at ??:?
[15] #2  ? at ??:?
[12] #2  ?[47] #1  Foam::sigFpe::sigHandler(int) in "/lib64/libc.so.6"
 in "/lib64/libc.so.6"
 in "/lib64/libc.so.6"
 in "/lib64/libc.so.6"
 at ??:?
 at ??:?
[4] #3  double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&) in "/lib64/libc.so.6"
[7] #3  double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&)[20] #3  double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&)[10] #3  double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&)[6] #3  double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
[54] #1  Foam::sigFpe::sigHandler(int) in "/lib64/libc.so.6"
[21] #3  double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
teddymett is offline   Reply With Quote

Old   May 27, 2019, 09:59
Default Foam::error::printStack(Foam::Ostream&) with interDyMFoam -parallel
  #26
New Member
 
Tewodros Meless Teshome
Join Date: Apr 2018
Posts: 9
Rep Power: 8
teddymett is on a distinguished road
Dear Alexeym,

Sorry to bother you. I had been trying to continue the run from the latestTime of the previous setting. I restarted from 0 removing the previous decomposition and it is running now. I may contact you in case I need you help.

Thank again.

Best Regards

Teddy M.
teddymett is offline   Reply With Quote

Old   May 27, 2019, 10:08
Default
  #27
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Well, in fact, the cause of new error is the same: your mass transfer solver diverges. Since you like relaxation so much, you can start relaxing A-equations also.

Also, it is not quite clear: you use fvSchemes settings for quite non-orthogonal mesh (limiting non-orthogonal correction, cellLimited grad schemes) and in your fvSolution there is 0 non-orthogonal correctors.

You use fixed number of outer correctors, you relax all equations (even on Final iteration), you do not check your solution convergence. Are you sure, your results have anything to do with reality?
alexeym is offline   Reply With Quote

Old   July 1, 2019, 13:13
Default scalarTransport
  #28
New Member
 
Tewodros Meless Teshome
Join Date: Apr 2018
Posts: 9
Rep Power: 8
teddymett is on a distinguished road
Dear Alexeym,

Upon your comment, I took some time to study what the code does behind and try to see how good it represents reality. In single-phase simulation (simpleFoam), the numerical result is fitting very well with the experimental tracer data on the same pilot. The "scalarTrasnport" function also runs smoothly in multiphase (interDyMFoam for water and air) in OpenFOAM 5. The numerical trace material is defined by "setField" (sphereToCell) inside the water phase. The result shows the tracer material is clearly transported and diffused but not constrained in the water phase only rather it is also dispersed in the air phase, which is not the reality. I found a tutorial in another version, OpenFOAM v-1812 that restricts the tracer in one phase. The problem in this version is that the trace is not moving. It only diffuses locally outward from its original center. Do you know if there is a way to constrain the transport of trace in one phase in OpenFOAM 5 or other versions?

Thanks in advance,

Teddy M

Code:
 /*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     interDyMFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         30;

deltaT          1e-4;

writeControl    adjustableRunTime;

writeInterval   0.1;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression uncompressed;

timeFormat      general;

timePrecision   10;

runTimeModifiable yes;

adjustTimeStep  yes;

maxCo           1.5;

maxAlphaCo      1;

maxDeltaT       1;

functions
{
    ATransport
    {
        type            scalarTransport;
        libs            ("libsolverFunctionObjects.so");

        enabled         true;
        writeControl    adjustableRunTime;
        writeInterval   0.01;

        field           A;
        bounded1       true;
        phase           alpha.water;
		
        write           true;

        fvOptions
        {
            
        }  

        resetOnStartUp  false;
    }
}

// ************************************************************************* //
teddymett is offline   Reply With Quote

Old   July 2, 2019, 07:52
Default
  #29
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

Could you be more clear with versions? You have found tutorial for ESI version of OpenFOAM and tried to use the same settings for Foundation OpenFOAM?

Your scalar being only diffused means that MULES compressed flux is zero. And this can be incompatibility between version. So can you elaborate on the way you are trying to limit your tracer to one phase?
alexeym is offline   Reply With Quote

Old   July 2, 2019, 13:43
Default scalarTransport
  #30
New Member
 
Tewodros Meless Teshome
Join Date: Apr 2018
Posts: 9
Rep Power: 8
teddymett is on a distinguished road
Dear Alexeym,

Thanks again for your reply. Let me try to be very clear.
I have both versions installed, from the Foundation (OF-5) and ESI (OF-v1812). I run the tutorial "waterChannel" on OF-v1812, where I originally found and the description of this tutorial states that passive scalar transport of tracer is phase constrained. I see in the result the tracer is distributed only in the water phase. But, since the tracer injection manner is "volumeMode", I couldn't see whether it is transported or not. I used "setField" rather, to inject the tracer and run again. In this case, the trace is only diffusing from the injection center defined by setField. Below is the line of code for MULES in "scalarTransport.C" of this version of OF. I am not sure if the 0 corresponds to phi.

if (bounded01_)
{
MULES::explicitSolve(s, phi, tTPhiUD.ref(), 1, 0);
}

I used the same geometry and setFieldDict to run on OF-5 from the foundation. This time the tracer is diffusing and also being transported along the flow direction to the outlet. But tracer material is found in the air phase too. In the real experiment, we inject tracer in the water phase and it is bounded in water only.
MULES is not called in "scalarTransport.C" of OF-5.

Teddy M
teddymett is offline   Reply With Quote

Old   July 3, 2019, 03:47
Default
  #31
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

This term is responsible for convection of the scalar:

Code:
fvm::div(limitedPhiAlpha, s, divScheme)
(fragment you have posted bounds scalar in [0; 1] range, and 0 is lower bound).

So, if your scalar is not convected, then limitedPhiAlpha is zero. It is looked up like this:

Code:
        const surfaceScalarField& limitedPhiAlpha =
            mesh_.lookupObject<surfaceScalarField>(phasePhiCompressedName_);
phasePhiCompressedName_ by default is alphaPhiUn, it is created in createFields.H of, for example, interFoam and should be updated by MULES. Why in your simulation this flux is not updated? I do not know. Guess, additional context could be useful. Maybe you even can start NEW thread with corresponding question.
alexeym is offline   Reply With Quote

Old   July 3, 2019, 10:48
Default scalarTransport
  #32
New Member
 
Tewodros Meless Teshome
Join Date: Apr 2018
Posts: 9
Rep Power: 8
teddymett is on a distinguished road
Dear Alexeym,

I truly appreciate your explanation as it gives me some insight to further explore. I will search for a possible solution and will post here also if it can help others.

Best regards,

Teddy M.
teddymett is offline   Reply With Quote

Old   July 5, 2019, 12:50
Default scalarTransport
  #33
New Member
 
Tewodros Meless Teshome
Join Date: Apr 2018
Posts: 9
Rep Power: 8
teddymett is on a distinguished road
Dear Alexeym,

I just introduced [ phasePhiCompressed alphaPhi0.water; ] inside the function attached at the bottom of the controlDict, as shown below and re-run the simulation. The tracer is now constrained in the water phase and also convected well in the flow direction. I have a screenshot attached that shows the difference with the previous case, where phasePhiCompressed is alphaPhiUn by default as you said, after 6 seconds of simulation.
alpha.water is the same for both cases at all times.
Could you please check if this is the right way to modify for the solver to handle the convection?


Best regards,

Teddy M

Code:
 /*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     interDyMFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         30;

deltaT          1e-4;

writeControl    adjustableRunTime;

writeInterval   0.1;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression uncompressed;

timeFormat      general;

timePrecision   10;

runTimeModifiable yes;

adjustTimeStep  yes;

maxCo           1.5;

maxAlphaCo      1;

maxDeltaT       1;

functions
{
    ATransport
    {
        type            scalarTransport;
        libs            ("libsolverFunctionObjects.so");

        enabled         true;
        writeControl    adjustableRunTime;
        writeInterval   0.01;

        field           A;
        bounded1       true;
        phase           alpha.water;
	phasePhiCompressed  alphaPhi0.water;	
        write           true;

        fvOptions
        {
            
        }  

        resetOnStartUp  false;
    }
}

// ************************************************************************* //
Attached Images
File Type: png s_6s.png (31.0 KB, 34 views)
File Type: png alpha.water_6s.png (35.1 KB, 34 views)
File Type: png s_6s_Zero.png (25.9 KB, 34 views)
File Type: png alpha.water_6s_Zero.png (37.7 KB, 30 views)
teddymett is offline   Reply With Quote

Old   March 3, 2021, 13:40
Default
  #34
Senior Member
 
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 10
randolph is on a distinguished road
Quote:
Originally Posted by teddymett View Post
"scalarTrasnport" function also runs smoothly in multiphase (interDyMFoam for water and air) in OpenFOAM 5. The numerical trace material is defined by "setField" (sphereToCell) inside the water phase. The result shows the tracer material is clearly transported and diffused but not constrained in the water phase only rather it is also dispersed in the air phase, which is not the reality. I found a tutorial in another version, OpenFOAM v-1812 that restricts the tracer in one phase. The problem in this version is that the trace is not moving. It only diffuses locally outward from its original center. Do you know if there is a way to constrain the transport of trace in one phase in OpenFOAM 5 or other versions?

Teddy,

I know this post has been a while but I will reply anyhow.

"phaseScalarTransport" is not implemented until OpenFOAM 7.0. If you use scalarTransport in OpenFOAM 5.0, the scalar will transport to the whole domain.

The "phaseScalarTransport" (in the OpenFOAM org version) is the "scalarTransport" in the ESI-OpenFOAM that enabled through "phase".

In addition, the phasePhiCompressed is defined with alphaPhiUn as the default as pointed out by Alex. However, I observed the same problem that using alphaPhiUn the scalar will not be convicted. I export the alphaPhiUn during the simulation. alphaPhiUn is zero. I also can not find anywhere the interFoam solver would pass a value to alphaPhiUn.

Meanwhile, if the alphaPhi0.water is used as the flux, partial of the scalar will be trapped at the old position where water used to be. I am actively addressing this issue.

Here is what I found so far. It looks like the OpenFOAM ESI v2006 has not completely implemented the phase contained transport. The OpenFOAM 8 implement the phase contained transport for VOF-like solver with addition estimation of the flux.
Code:
If \c alphaPhi is not found, then a pressure-like
    equation will be solved in order to construct it so that it exactly matches
    the time-derivative of the phase volume or mass. This is likely to be
    necessary in volume-of-fluid solvers where \c alphaPhi is not part of the
    solution procedure. The pressure field name will be required in this case.
The flux is estimated as:

Code:
     // If alphaPhi exists then return it
     if (mesh_.foundObject<surfaceScalarField>(alphaPhiName_))
     {
         return mesh_.lookupObject<surfaceScalarField>(alphaPhiName_);
     }
 
     // Otherwise generate it ...
     Info<< type() << ": " << surfaceScalarField::typeName << " "
         << alphaPhiName_ << " was not found, so generating it" << endl;
 
     const volScalarField& alpha =
         mesh_.lookupObject<volScalarField>(alphaName_);
     const surfaceScalarField& phi =
         mesh_.lookupObject<surfaceScalarField>(phiName_);
 
     // Make a crude guess of the phase flux using default interpolation
     tmp<surfaceScalarField> tAlphaPhi
     (
         new surfaceScalarField
         (
             alphaPhiName_,
             phi*fvc::interpolate(alpha)
         )
     );
     surfaceScalarField& alphaPhi = tAlphaPhi.ref();
 
     // Get the potential field
     volScalarField& Phi(this->Phi());
 
     // Construct the scheme names
     const word laplacianScheme = "laplacian(" + pName_ + ")";
 
     // Debug writing. Write the material derivative of alpha, before and after
     // the solution of the potential and the correction of alphaPhi. Before
     // correction the field should be non-zero, and after it should be
     // comparable to the solution tolerance.
     auto writeDDt = [&](const label i)
     {
         const volScalarField DDtAlpha
         (
             "DDt("
           + IOobject::groupName
             (
                 IOobject::member(alpha.name()) + Foam::name(i),
                 IOobject::group(alpha.name())
             )
           + ")",
             fvc::ddt(alpha) + fvc::div(alphaPhi)
         );
         Info<< type() << ": Writing " << DDtAlpha.name() << endl;
         DDtAlpha.write();
     };
     if (debug && mesh_.time().writeTime())
     {
         writeDDt(0);
     }
Now, I am going to imitate the OpenFOAM 8 implementation in an ESI solver and see what happens. Will update.


Thanks,
Rdf

Last edited by randolph; March 3, 2021 at 21:53.
randolph is offline   Reply With Quote

Old   January 30, 2022, 08:21
Default
  #35
Senior Member
 
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 10
randolph is on a distinguished road
Quote:
Originally Posted by randolph View Post
Teddy,

I know this post has been a while but I will reply anyhow.

"phaseScalarTransport" is not implemented until OpenFOAM 7.0. If you use scalarTransport in OpenFOAM 5.0, the scalar will transport to the whole domain.

The "phaseScalarTransport" (in the OpenFOAM org version) is the "scalarTransport" in the ESI-OpenFOAM that enabled through "phase".

In addition, the phasePhiCompressed is defined with alphaPhiUn as the default as pointed out by Alex. However, I observed the same problem that using alphaPhiUn the scalar will not be convicted. I export the alphaPhiUn during the simulation. alphaPhiUn is zero. I also can not find anywhere the interFoam solver would pass a value to alphaPhiUn.

Meanwhile, if the alphaPhi0.water is used as the flux, partial of the scalar will be trapped at the old position where water used to be. I am actively addressing this issue.

Here is what I found so far. It looks like the OpenFOAM ESI v2006 has not completely implemented the phase contained transport. The OpenFOAM 8 implement the phase contained transport for VOF-like solver with addition estimation of the flux.
Code:
If \c alphaPhi is not found, then a pressure-like
    equation will be solved in order to construct it so that it exactly matches
    the time-derivative of the phase volume or mass. This is likely to be
    necessary in volume-of-fluid solvers where \c alphaPhi is not part of the
    solution procedure. The pressure field name will be required in this case.
The flux is estimated as:

Code:
     // If alphaPhi exists then return it
     if (mesh_.foundObject<surfaceScalarField>(alphaPhiName_))
     {
         return mesh_.lookupObject<surfaceScalarField>(alphaPhiName_);
     }
 
     // Otherwise generate it ...
     Info<< type() << ": " << surfaceScalarField::typeName << " "
         << alphaPhiName_ << " was not found, so generating it" << endl;
 
     const volScalarField& alpha =
         mesh_.lookupObject<volScalarField>(alphaName_);
     const surfaceScalarField& phi =
         mesh_.lookupObject<surfaceScalarField>(phiName_);
 
     // Make a crude guess of the phase flux using default interpolation
     tmp<surfaceScalarField> tAlphaPhi
     (
         new surfaceScalarField
         (
             alphaPhiName_,
             phi*fvc::interpolate(alpha)
         )
     );
     surfaceScalarField& alphaPhi = tAlphaPhi.ref();
 
     // Get the potential field
     volScalarField& Phi(this->Phi());
 
     // Construct the scheme names
     const word laplacianScheme = "laplacian(" + pName_ + ")";
 
     // Debug writing. Write the material derivative of alpha, before and after
     // the solution of the potential and the correction of alphaPhi. Before
     // correction the field should be non-zero, and after it should be
     // comparable to the solution tolerance.
     auto writeDDt = [&](const label i)
     {
         const volScalarField DDtAlpha
         (
             "DDt("
           + IOobject::groupName
             (
                 IOobject::member(alpha.name()) + Foam::name(i),
                 IOobject::group(alpha.name())
             )
           + ")",
             fvc::ddt(alpha) + fvc::div(alphaPhi)
         );
         Info<< type() << ": Writing " << DDtAlpha.name() << endl;
         DDtAlpha.write();
     };
     if (debug && mesh_.time().writeTime())
     {
         writeDDt(0);
     }
Now, I am going to imitate the OpenFOAM 8 implementation in an ESI solver and see what happens. Will update.


Thanks,
Rdf
An ad-hoc solution that I found for this problem.

interFoam with scalar transport in single phase
randolph is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
modified interfoam diverge in parallel Kareem Abdelshafy OpenFOAM Running, Solving & CFD 0 August 20, 2016 20:41
Explicitly filtered LES saeedi Main CFD Forum 16 October 14, 2015 11:58
simpleFoam parallel AndrewMortimer OpenFOAM Running, Solving & CFD 12 August 7, 2015 18:45
interFoam in parallel gooya_kabir OpenFOAM Running, Solving & CFD 0 December 9, 2013 05:09
interFoam parallel idefix OpenFOAM Pre-Processing 7 October 23, 2013 02:35


All times are GMT -4. The time now is 01:46.