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

Why do probes always sample the same value?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 24, 2021, 06:56
Default Why do probes always sample the same value?
  #1
New Member
 
Ali Can
Join Date: Apr 2021
Posts: 26
Rep Power: 4
Ryuzaki is on a distinguished road
Hi all,
Firstly, I am simulating the cavity flow with and without doors at 0.85 Mach. I have successfully completed the "without doors" analysis. However, in with doors case, I have a problem with probes that sample pressure value at every time step. My initial pressure value is 62100Pa. After some time steps, probes start to measure the same pressure value which is equal to half of the initial value until the end of the analysis. I have tried different schemes but the results are the same. When I check the mesh quality, everything seems ok. In "without doors" case probes were quite successful to catch pressure fluctuations but "with doors" case probes don't catch the pressure fluctuations. What could be the problem?
thanks in advance..
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1912                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

7
(
    back
    {
        type            symmetry;
        inGroups        1(symmetry);
        nFaces          393600;
        startFace       81097200;
    }
    door
    {
        type            wall;
        inGroups        1(walls);
        nFaces          75200;
        startFace       81490800;
    }
    front
    {
        type            patch;
		inGroups		1(farfield);
        nFaces          304000;
        startFace       81566000;
    }
    inlet
    {
        type            patch;
		inGroups		1(farfield);
        nFaces          6400;
        startFace       81870000;
    }
    outlet
    {
        type            patch;
		inGroups     	1(farfield);
        nFaces          6400;
        startFace       81876400;
    }
    top
    {
        type            patch;
		inGroups	    1(farfield);
        nFaces          304000;
        startFace       81882800;
    }
    wall
    {
        type            wall;
        inGroups        1(walls);
        nFaces          396000;
        startFace       82186800;
    }
)

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

solvers
{
    "(p|rho)"
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-6;
        relTol          0.01;
    }

    "(p|rho)Final"
    {
        $p;
        relTol          0;
    }

    "(U|k|e)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-6;
        relTol          0.01;
    }

    "(U|k|e)Final"
    {
        $U;
        relTol          0;
    }
    
    "(U|k|B|nuTilda)"
    {
        solver          smoothSolver;
	smoother        symGaussSeidel;
	tolerance       1e-7;
	relTol          0;
    }

    "(U|k|B|nuTilda)Final"
    {
       $U;
       relTol		0;
    }     
}

PIMPLE
{
    momentumPredictor yes;
    nOuterCorrectors 2;
    nCorrectors     2; // 1
    nNonOrthogonalCorrectors 1;

    pMinFactor      0.5;
    pMaxFactor      2.0;
}

relaxationFactors
{
    equations
    {
        ".*"  1;
    }
}

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

ddtSchemes
{
    default         backward;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         none;
    div(phi,U)      Gauss linearUpwind	grad(U);
    div(phi,e)      Gauss limitedLinear 1;
    div(phi,K)      Gauss limitedLinear 1;
    div(phiv,p)     Gauss limitedLinear 1;
    div(phi,k)      Gauss limitedLinear 1;
    div(phi,B)      Gauss limitedLinear 1;
    div(B)          Gauss linear;
    div(phi,nuTilda) Gauss limitedLinear 1;
    div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

wallDist
{
    method	    meshWave;
}

// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1912                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     rhoPimpleFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         0.0625;

deltaT          1.76e-6;

writeControl    adjustable;

writeInterval   0.0125;

purgeWrite      0;

writeFormat     ascii;

writePrecision   6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;


functions
{
    #includeFunc MachNo
    #includeFunc residuals
	
	probes
	{
		type			probes;
		libs		    ("libsampling.so");
		writeControl	runTime;
		writeInterval	1.76e-6;
		
		fields
		(
			p
		);
		
		probeLocations
		(
			(0.0254 0 0)
			(0.0762 0 0)
			(0.1270 0 0)
			(0.1778 0 0)
			(0.2286 0 0)
			(0.2794 0 0)
			(0.3302 0 0)
			(0.3810 0 0)
			(0.4318 0 0)
			(0.4826 0 0)
		);
	}
}	

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

simulationType  LES;

LES
{
	LESModel            SpalartAllmarasDDES;

	delta               vanDriest;

	printCoeffs         on;

        turbulence          on;	

	cubeRootVolCoeffs
{
    deltaCoeff      1;
}


laminarCoeffs
{
}

oneEqEddyCoeffs
{
    ck               0.07;
    ce               1.05;
}

dynOneEqEddyCoeffs
{
    ce               1.05;
    filter          simple;
}

locDynOneEqEddyCoeffs
{
    ce               1.05;
    filter          simple;
}

SmagorinskyCoeffs
{
    ce               1.05;
    ck               0.07;
}

Smagorinsky2Coeffs
{
    ce               1.05;
    ck               0.07;
    cD2              0.02;
}

spectEddyViscCoeffs
{
    ce               1.05;
    cB               8.22;
    cK1              0.83;
    cK2              1.03;
    cK3              4.75;
    cK4              2.55;
}

dynSmagorinskyCoeffs
{
    ce               1.05;
    filter          simple;
}

mixedSmagorinskyCoeffs
{
    ce               1.05;
    ck               0.07;
    filter          simple;
}

dynMixedSmagorinskyCoeffs
{
    ce               1.05;
    filter          simple;
}

LRRDiffStressCoeffs
{
    ce               1.05;
    ck               0.09;
    c1               1.8;
    c2               0.6;
}

DeardorffDiffStressCoeffs
{
    ce               1.05;
    ck               0.09;
    cm               4.13;
}

SpalartAllmarasCoeffs
{
    alphaNut         1.5;
    Cb1              0.1355;
    Cb2              0.622;
    Cw2              0.3;
    Cw3              2;
    Cv1              7.1;
    Cv2              5.0;
    CDES             0.65;
    ck               0.07;
}

SpalartAllmarasDDESCoeffs
{
    alphaNut         1.5;
    Cb1              0.1355;
    Cb2              0.622;
    Cw2              0.3;
    Cw3              2.0;
    Cv1              7.1;
    Cv2              5.0;
    CDES             0.65;
    ck               0.07;
}

SpalartAllmarasIDDESCoeffs
{
     delta  IDDESDelta;

     IDDESDeltaCoeffs
     {
         deltaCoeff       1;

         //according to src/turbulenceModels/incompressible/LES/SpalartAllmarasIDDES/IDDESDelta/IDDESDelta.C
         cw               0.15;
     }

     alphaNut         1.5;
     kappa            0.4187;
     Cb1              0.1355;
     Cb2              0.622;
     Cw2              0.3;
     Cw3              2.0;
     Cv1              7.1;
     Cv2              5.0;
     CDES             0.65;
     ck               0.07;

//These are the default values
     sigmaNut        0.66666;
     kappa           0.41;
     Cb1             0.1355;
     Cb2             0.622;
     Cv1             7.1;
     Cv2             5;
     CDES            0.65;
     ck              0.07;
     Cw2             0.3;
     Cw3             2;
     fwStar          0.424;
     cl              3.55;
     ct              1.63;

}

cubeRootVolCoeffs
{
    deltaCoeff      1;
}

PrandtlCoeffs
{
    delta           cubeRootVol;
    cubeRootVolCoeffs
    {
        deltaCoeff      1;
    }
    smoothCoeffs
    {
        delta           cubeRootVol;
        cubeRootVolCoeffs
        {
            deltaCoeff      1;
        }
        maxDeltaRatio   1.1;
    }
    Cdelta           0.158;
}

vanDriestCoeffs
{
    delta           cubeRootVol;
    cubeRootVolCoeffs
    {
        deltaCoeff      1;
    }
    smoothCoeffs
    {
        delta           cubeRootVol;
        cubeRootVolCoeffs
        {
            deltaCoeff      1;
        }
        maxDeltaRatio   1.1;
    }
    Aplus            26;
    Cdelta           0.158;
}

smoothCoeffs
	{
    delta           cubeRootVol;
    cubeRootVolCoeffs
    {
        deltaCoeff      1;
    }
    maxDeltaRatio   1.1;
	}

kappa            0.4187;

wallFunctionCoeffs
	{
    E                9;
	}

}
// ************************************************************************* //
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];
internalField uniform (278.19 0 0);

boundaryField
{
farfield
{
type freestreamVelocity;
freestreamValue $internalField;
}

wall
{
type noSlip;

}
kayma
{
type slip;
}
door
{
type noSlip;
}

back
{
type symmetry;
}
}

// ************************************************** *********************** //
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //



dimensions [0 0 0 1 0 0 0];

internalField uniform 266.53;

boundaryField
{
inlet
{
type fixedValue;
value uniform 266.53;
}

outlet
{
type zeroGradient;
}

walls
{
type zeroGradient;
}

front
{
type zeroGradient;
}

top
{
type zeroGradient;
}

back
{
type symmetry;
}
}

// ************************************************** *********************** //
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform 62100;

boundaryField
{
back
{
type symmetry;
}

front
{
type zeroGradient;
}

walls
{
type zeroGradient;
}

inlet
{
type zeroGradient;
}

outlet
{
type waveTransmissive;
field p;
psi thermosi;
gamma 1.4;
fieldInf 62100;
lInf 1000;
value $internalField;
}
top
{
type zeroGradient;
}
}

// ************************************************** *********************** //
Attached Images
File Type: jpg checkmesh1.JPG (52.8 KB, 8 views)
File Type: jpg checkmesh2.JPG (55.3 KB, 7 views)
Ryuzaki is offline   Reply With Quote

Old   October 26, 2021, 05:12
Default
  #2
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Where are your probes located? An image might change.
Do the physical fields change after that timestep?


I suppose its rather not a problem with the sampling, since usually it works flawlessly.
shock77 is offline   Reply With Quote

Old   October 26, 2021, 06:11
Default
  #3
New Member
 
Ali Can
Join Date: Apr 2021
Posts: 26
Rep Power: 4
Ryuzaki is on a distinguished road
Firstly I would like to thank you for your reply,

My probes are located on the cavity floor (can be seen in the figure). In the "without doors" case my everything was fine, like you said probably it is not a problem with sampling...

I checked the physical fields, freestream value starts with 278m/s and suddenly drops to very small values such as 1, 2.. However, my pressure value seems half of the initial pressure value again.

I carried out another simulation using a different turbulence model and the same pressure value was measured very long time. After very long time pressure fluctuations commenced but fluctuations are about only 1-2 pascal.

Is it a good idea to extend the end time of the analysis? I'm stuck on this problem.

thanks in advance..
Attached Images
File Type: jpg probes.JPG (39.4 KB, 7 views)
Ryuzaki is offline   Reply With Quote

Old   October 26, 2021, 06:23
Default
  #4
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
I have just now checked your BCs.


Things that might be a problem:


1. I see no inlet BC for U. Maybe its a copy paste error, since otherwise the simulation wouldnt even start?


2. You are setting the inlet for p to zeroGradient and the outlet to wavetransmissive. Depending on your inletBC for U, they might not form a closed system.



You should try the following: either p and U as fixedValue at the inlet and the outlet waveTransmissive for p and U or


totalPresse and pressureInletOutletVelocity for U at the inlet and for p and U waveTransmissive at the outlet or



you try a massFlowRate-BC for U at the inlet. I think then setting p to zeroGradient is fine.
shock77 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Sample utility bug? For many cloud points in the sampleDict, some are neglected! brandius OpenFOAM Post-Processing 10 August 22, 2022 10:56
heat conducting in a solid domain Rogerio Fernandes Brito Phoenics 0 March 18, 2008 18:23
heat conducting in a solid domain Rogerio Fernandes Brito Siemens 0 March 18, 2008 18:23
heat conducting in a solid domain Rogerio Fernandes Brito CFX 0 March 18, 2008 18:20
about my old post Rogerio Fernandes Brito CFX 1 February 8, 2008 20:19


All times are GMT -4. The time now is 09:00.