CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Unknown function type pressureTools

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 7, 2017, 02:06
Default Unknown function type pressureTools
  #1
New Member
 
Join Date: May 2017
Location: Japan, Kitakyushu
Posts: 19
Rep Power: 8
Dorian1504 is on a distinguished road
Hello,

I'm trying to use the pressureTools function in order to compute the pressure coefficient around a wing. However I have the following error :
Code:
Starting time loop

--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 671
    Caught FatalError 
--> FOAM FATAL ERROR: 
Unknown function type pressureTools

Valid functions are : 

15
(
abort
coded
patchProbes
probes
psiReactionThermoMoleFractions
removeRegisteredObject
residuals
rhoReactionThermoMoleFractions
setTimeStep
sets
surfaces
systemCall
timeActivatedFileUpdate
writeDictionary
writeObjects
)
The function was defined in my controlDict file :
Code:
functions
{

    pressureTools1
    {
        type                pressureTools;
        functionObjectLibs ("libutilityFunctionObjects.so");
        enabled             yes;
        region              defaultRegion;
        calcTotal           no;
        calcCoeff           yes;
        timeStart           10;
        timeEnd             10;
        writeControl        outputTime;
        writeInterval       1;
        rhoInf              1.17663;
        pInf                101325;
        UInf                (231.91 0 0);

    }
}
Do you have an idea why I get this message ?

Thank you

Dorian
Dorian1504 is offline   Reply With Quote

Old   November 7, 2017, 03:49
Default
  #2
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,

pressureTools were renamed in pressure (in version 4.x). Now the function resides in libfieldFunctionObjects library.

So, answering your question, the reason for the message is "you are trying to use old settings for new version of OpenFOAM".
alexeym is offline   Reply With Quote

Old   November 8, 2017, 03:33
Default
  #3
New Member
 
Join Date: May 2017
Location: Japan, Kitakyushu
Posts: 19
Rep Power: 8
Dorian1504 is on a distinguished road
Thank you very much, it works perfectly !

Dorian
Dorian1504 is offline   Reply With Quote

Old   January 4, 2018, 13:34
Default
  #4
Member
 
Jason G.
Join Date: Sep 2009
Location: St. Louis, IL
Posts: 89
Rep Power: 16
JasonG is on a distinguished road
I am currently working on making the switch from OF3.0 to 5.0, and have also hit my first road block with the change from pressureTools.

My current OF3.0 code exports the areaAverage of the static pressure field on a specified patch:

Code:
#include        "../0/initialConditions"

pressure_tools1
{
type                pressureTools;
functionObjectLibs  ("libutilityFunctionObjects.so");        
enabled             yes;        
outputControl outputTime;//timeStep;//
rhoName              rhoInf;
rhoInf              $density;// Value of the density(sslug/in^3) pstatic = lbf/in^2 
pRef				$pressure;


calcTotal no;   //yes for total, need to change reloadTotalP and inlet_avg_tot_p
calcCoeff no;

}



  reloadPcalc
    {
        type        readFields;
        functionObjectLibs ("libfieldFunctionObjects.so");
        //region          defaultRegion;
        enabled         yes;
        timeStart       10;
        timeEnd         10000;
        outputInterval 10; // 5000;
        fields
        (
         // "total(p)"
        "static(p)"
		
		);
    }


inlet_1_ps
    {
        type            faceSource;
        functionObjectLibs ("libfieldFunctionObjects.so");
        enabled         true;
        timeStart       10;
        timeEnd         10000;
        outputInterval 10; // 5000;        
        log             true;
        valueOutput     false;
        source          patch;
        sourceName      inlet_1;
		
		operation       areaAverage;
		//operation		weightedAverage;
		//weightField        phi; 
		
		
		
        fields
        (
		//"total(p)"
		"static(p)"
        );
    }
After reading the comments above, I was able to update my code to export the static pressure field in OF 5.0, but I am having difficulty with the post processing code segment that obtains the areaAverage on a specified patch. Current OF5.0 Code:

Code:
#include        "../0/initialConditions"

pressure_tools1
{
type                pressure; //pressureTools; renamed "pressure" in OF5.0
functionObjectLibs  ("libfieldFunctionObjects.so"); //("libutilityFunctionObjects.so");        
enabled             yes;        
//outputControl outputTime;//timeStep;//
writeControl		outputTime;
rhoName              rhoInf;
rhoInf              $density;// Value of the density(sslug/in^3) pstatic = lbf/in^2 
pRef				$pressure;


calcTotal no;   //yes for total, need to change reloadTotalP and inlet_avg_tot_p
calcCoeff no;

}



  reloadPcalc
    {
        type        readFields;
        functionObjectLibs ("libfieldFunctionObjects.so");
        //region          defaultRegion;
        enabled         yes;
        timeStart       10;
        timeEnd         10000;
        writeControl	writeTime;
		writeInterval	10;
		outputInterval 10; // 5000;
        fields
        (
         // "total(p)"
        "static(p)"
		
		);
    }


inlet_1_ps
    {
		

        type            surfaceFieldValue;
        libs            ("libfieldFunctionObjects.so");
        log             true;
        writeControl    writeTime;
        writeFields     true;
        regionType      patch;
        name            inlet_1;
        operation       areaAverage;		
        fields
        (
    //        "total(p)"
			"static(p)"
        );
    }
The above code generates and error saying "keyword surfaceFormat is undefined in dictionary "IOstream.functions.inlet_1_ps". When I read surfaceFieldValue.H, it doesn't seem to require the surfaceFormat parameter, so I am a little confused.
JasonG is offline   Reply With Quote

Old   January 4, 2018, 15:02
Default
  #5
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,

surfaceFormat is not required if you do not write fields. See the code:

Code:
    if (writeFields_)
    {
        const word surfaceFormat(dict.lookup("surfaceFormat"));

        surfaceWriterPtr_.reset
        (
            surfaceWriter::New
            (
                surfaceFormat,
                dict.subOrEmptyDict("formatOptions").
                    subOrEmptyDict(surfaceFormat)
            ).ptr()
        );
    }
Just set writeFields to no (or off, or false).
alexeym is offline   Reply With Quote

Old   January 5, 2018, 14:11
Default
  #6
Member
 
Jason G.
Join Date: Sep 2009
Location: St. Louis, IL
Posts: 89
Rep Power: 16
JasonG is on a distinguished road
Thanks!

In order to get my static pressure as a product of the density and kinematic pressure, I had to define "rho" as follows:

Code:
#include        "../0/initialConditions"

pressure_tools1
{
type                pressure; //pressureTools; renamed "pressure" in OF5.0
functionObjectLibs  ("libfieldFunctionObjects.so"); //("libutilityFunctionObjects.so");        
writeControl		outputTime;
rho		            rhoInf;
rhoInf              $density;// Value of the density(sslug/in^3) pstatic = lbf/in^2 
pRef				$pressure;
calcTotal no;   //yes for total, need to change reloadTotalP and inlet_avg_tot_p
calcCoeff no;

}
If I attempted to just define rho as $density, I get an error saying it is expecting text not a scalar. If define it as above, it seems to work correctly.
JasonG is offline   Reply With Quote

Old   January 5, 2018, 14:35
Default
  #7
Member
 
Jason G.
Join Date: Sep 2009
Location: St. Louis, IL
Posts: 89
Rep Power: 16
JasonG is on a distinguished road
For the majority of my simulations, I will initialize fields with the potentialFoam solver. I just realized that my boundary conditions do not appear to be working correctly in OF 5.0 when using potentialFoam. The only thing I can think that might be throwing it off is my inlet velocity BC, any suggestions?

U:
Code:
#include        "initialConditions"

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

internalField   uniform (0 0 0);

boundaryField
{

    "inlet.*"   
    {
 	type		surfaceNormalFixedValue;
	refValue     uniform $velMag;
	value         uniform (0 0 0);
/*
	type            inletOutlet;
        inletValue      $flowVelocity;
        value           $flowVelocity;
*/
		}

    "outlet.*"        
    {
    //    type            zeroGradient;
	
        type            inletOutlet;
        inletValue      $internalField;
        value           $internalField;
	}
	
	"boundary.*"    
    {
        type            fixedValue;
        value           $internalField;
    }
    "symmetry.*"       
    {
        type		symmetry;
    }
	

}
P:
Code:
#include        "initialConditions"

//pressure_inlet_p	#calc "$p_inlet / $density";

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

internalField   uniform $pressure;

boundaryField
{
 
    "inlet.*"         
    {
        type            outletInlet;
        outletValue     $internalField;
        value           $internalField;
    }

    "outlet.*"     
      {
        type            fixedValue;
        value           $internalField;
    }
 
	"symmetry.*"       
    {
        type		symmetry;
    }
 
    "boundary.*"     
    {
        type            zeroGradient;
    }

}
Omega:
Code:
#include        "initialConditions"

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

internalField   uniform $turbulentOmega;

omegaF	fixedValue; //omegaWallFunction;

boundaryField
{

    "inlet.*" 
    {
/*
        type            fixedValue;
        value           uniform $omega_inlet;
*/
        type            zeroGradient;
    }

    "outlet.*"
    {
        type            zeroGradient;
//       type            inletOutlet;
//       inletValue      $internalField;
//       value           $internalField;
    }
    "boundary.*"
    {
        type            $omegaF;
        value           uniform 1e-10;
    }
    "symmetry.*"       
    {
        type		symmetry;
    }
   
}
nut:
Code:
dimensions      [0 2 -1 0 0 0 0];

internalField   uniform 1e-10;


nutModel	fixedValue; //nutLowReWallFunction;   //nutUWallFunction //nutUSpaldingWallFunction  //nutLowReWallFunction 



boundaryField
{
   
   "inlet.*"
    {
        type            zeroGradient;
    }
    "outlet_.*"
    {
        type            zeroGradient;
    } 
	
    "boundary.*"
    {
	type            $nutModel;
        value           uniform 1e-10;
    } 
    "symmetry.*"       
    {
        type		symmetry;
    }

}
k:
Code:
#include        "initialConditions"

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

internalField   uniform $turbulentKE;

kWallF	fixedValue; //kqRWallFunction;

boundaryField
{

    "inlet.*" 
    {
/*
        type            fixedValue;
        value           uniform $ke_inlet;
*/
        type            zeroGradient;
    }

    "outlet.*"
    {
        type            zeroGradient;
    }
	
    "boundary.*"
    {
        type            $kWallF;
        value           uniform 1e-10;
    }
    "symmetry.*"       
    {
        type		symmetry;
    }
  

}
epsilon:
Code:
#include        "initialConditions"

dimensions      [ 0 2 -3 0 0 0 0 ];

internalField   uniform $turbulentDissipation;

eWallF	fixedValue; //epsilonWallFunction;


boundaryField
{
    "inlet.*" 
    {
/*
        type            fixedValue;
        value           uniform $dissipation_inlet;
*/
        type            zeroGradient;
    }


    "outlet.*"
    {
        type            zeroGradient;
    }

	
    "boundary.*"
    {
        type            $eWallF;
        value           uniform 1e-10;
    }
    "symmetry.*"       
    {
        type		symmetry;
    }
  
}
EDIT: I was just searching through the potentialFoam.C file, and it appears it no longer includes "#include "fvIOoptionList.H"" as it did in OF3.0. Does this mean I am unable to use potentialFoam when I have a BC that is derived as I do above?
JasonG is offline   Reply With Quote

Old   January 5, 2018, 16:40
Default
  #8
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,

1. rho value should be a name of density field or rhoInf (in this case rho is set uniformly to the value of rhoInf). So, your configuration is OK.

2. Was not able to find inclusion of fvIOoptionList.H in version 3.0.x (https://github.com/OpenFOAM/OpenFOAM...otentialFoam.C). So could you elaborate concerning "do not appear to be working correctly in OF 5.0"?
JasonG likes this.
alexeym is offline   Reply With Quote

Old   January 5, 2018, 16:49
Default
  #9
Member
 
Jason G.
Join Date: Sep 2009
Location: St. Louis, IL
Posts: 89
Rep Power: 16
JasonG is on a distinguished road
Quote:
Originally Posted by alexeym View Post
Hi,

1. rho value should be a name of density field or rhoInf (in this case rho is set uniformly to the value of rhoInf). So, your configuration is OK.

2. Was not able to find inclusion of fvIOoptionList.H in version 3.0.x (https://github.com/OpenFOAM/OpenFOAM...otentialFoam.C). So could you elaborate concerning "do not appear to be working correctly in OF 5.0"?
Hi, my potentialFoam.C is as follows:

Code:
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     |
    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
     \\/     M anipulation  |
-------------------------------------------------------------------------------
License
    This file is part of OpenFOAM.

    OpenFOAM is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    for more details.

    You should have received a copy of the GNU General Public License
    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.

Application
    potentialFoam

Description
    Potential flow solver which solves for the velocity potential
    from which the flux-field is obtained and velocity field by reconstructing
    the flux.

    This application is particularly useful to generate starting fields for
    Navier-Stokes codes.

\*---------------------------------------------------------------------------*/

#include "fvCFD.H"
#include "pisoControl.H"
#include "fvIOoptionList.H"

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

int main(int argc, char *argv[])
{
    argList::addOption
    (
        "pName",
        "pName",
        "Name of the pressure field"
    );

    argList::addBoolOption
    (
        "initialiseUBCs",
        "Initialise U boundary conditions"
    );

    argList::addBoolOption
    (
        "writePhi",
        "Write the velocity potential field"
    );

    argList::addBoolOption
    (
        "writep",
        "Calculate and write the pressure field"
    );

    argList::addBoolOption
    (
        "withFunctionObjects",
        "execute functionObjects"
    );

    #include "setRootCase.H"
    #include "createTime.H"
    #include "createMesh.H"

    pisoControl potentialFlow(mesh, "potentialFlow");

    #include "createFields.H"
    #include "createMRF.H"
    #include "createFvOptions.H"

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

    Info<< nl << "Calculating potential flow" << endl;

    // Since solver contains no time loop it would never execute
    // function objects so do it ourselves
    runTime.functionObjects().start();

    MRF.makeRelative(phi);
    adjustPhi(phi, U, p);

    // Non-orthogonal velocity potential corrector loop
    while (potentialFlow.correctNonOrthogonal())
    {
        fvScalarMatrix PhiEqn
        (
            fvm::laplacian(dimensionedScalar("1", dimless, 1), Phi)
         ==
            fvc::div(phi)
        );

        PhiEqn.setReference(PhiRefCell, PhiRefValue);
        PhiEqn.solve();

        if (potentialFlow.finalNonOrthogonalIter())
        {
            phi -= PhiEqn.flux();
        }
    }

    MRF.makeAbsolute(phi);

    Info<< "Continuity error = "
        << mag(fvc::div(phi))().weightedAverage(mesh.V()).value()
        << endl;

    U = fvc::reconstruct(phi);
    U.correctBoundaryConditions();

    Info<< "Interpolated velocity error = "
        << (sqrt(sum(sqr((fvc::interpolate(U) & mesh.Sf()) - phi)))
          /sum(mesh.magSf())).value()
        << endl;

    // Write U and phi
    U.write();
    phi.write();

    // Optionally write Phi
    if (args.optionFound("writePhi"))
    {
        Phi.write();
    }

    // Calculate the pressure field
    if (args.optionFound("writep"))
    {
        Info<< nl << "Calculating approximate pressure field" << endl;

        label pRefCell = 0;
        scalar pRefValue = 0.0;
        setRefCell
        (
            p,
            potentialFlow.dict(),
            pRefCell,
            pRefValue
        );

        // Calculate the flow-direction filter tensor
        volScalarField magSqrU(magSqr(U));
        volSymmTensorField F(sqr(U)/(magSqrU + SMALL*average(magSqrU)));

        // Calculate the divergence of the flow-direction filtered div(U*U)
        // Filtering with the flow-direction generates a more reasonable
        // pressure distribution in regions of high velocity gradient in the
        // direction of the flow
        volScalarField divDivUU
        (
            fvc::div
            (
                F & fvc::div(phi, U),
                "div(div(phi,U))"
            )
        );

        // Solve a Poisson equation for the approximate pressure
        while (potentialFlow.correctNonOrthogonal())
        {
            fvScalarMatrix pEqn
            (
                fvm::laplacian(p) + divDivUU
            );

            pEqn.setReference(pRefCell, pRefValue);
            pEqn.solve();
        }

        p.write();
    }

    runTime.functionObjects().end();

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

    Info<< "End\n" << endl;

    return 0;
}
I am a little too unfamiliar with the underlying code to know if this is causing my issues. My OF 3.0 pStatic results are ~96 PSID, this closely matches OF 5.0 results without using potentialFoam. When using potentialFoam I am seeing ~16PSID, and the pressure gradient at my inlet is very discontinuous.

Next, I will likely try the standard uniform fixedRate inlet BC for the velocity.
JasonG is offline   Reply With Quote

Old   January 5, 2018, 17:43
Default
  #10
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,

Concerning fvOptions, finally it was removed:

https://github.com/OpenFOAM/OpenFOAM...b3960a2ae08574

https://bugs.openfoam.org/view.php?id=1964

In fact, I do not see anything special in your boundary conditions (i.e. something that can lead to big difference in results). So I would suppose, it is, for example, convergence criterion, who makes the difference. Yet, without additional information it is difficult to say.
JasonG likes this.
alexeym is offline   Reply With Quote

Old   January 8, 2018, 08:47
Default
  #11
Member
 
Jason G.
Join Date: Sep 2009
Location: St. Louis, IL
Posts: 89
Rep Power: 16
JasonG is on a distinguished road
I think you are correct. I have attempted to run with a non derived BC at the inlet, and I am still getting incorrect results. Attached are images of the static pressure field on my inlet patch. The more uniform image is from my solution that was run without first running potentialFoam, while the more discontinuous image is from my solution after running potentialFoam first.

fvSchemes:

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

ddtSchemes
{
    default         steadyState;
}

gradSchemes
{
    default         Gauss linear;
//    grad(p)         Gauss linear;  //commented out on 8/6/2015
    grad(U)         Gauss linear;
}

///*
divSchemes
{
    default         none;
    div(phi,U)      bounded Gauss linearUpwindV grad(U);
    div(div(phi,U)) Gauss linear;  //added on 8/6/2015
    div(phi,k)      bounded Gauss upwind;
    div(phi,epsilon) bounded Gauss upwind;
    div(phi,R)      bounded Gauss upwind;
    div(R)          Gauss linear;
    div(phi,nuTilda) bounded Gauss upwind;
    div((nuEff*dev(T(grad(U))))) Gauss linear;
	div((nuEff*dev2(T(grad(U))))) Gauss linear;  //added for OF3.0 on 5/5/2017
    div(phi,omega)  bounded Gauss upwind;
}


laplacianSchemes
{
    default         Gauss linear corrected;	  //Gauss linear limited 0.5;
    laplacian(nuEff,U) Gauss linear corrected;
    laplacian((1|A(U)),p) Gauss linear corrected;
    laplacian(DkEff,k) Gauss linear corrected;
    laplacian(DepsilonEff,epsilon) Gauss linear corrected;
    laplacian(DREff,R) Gauss linear corrected;
    laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}



interpolationSchemes
{
    default         linear;
    interpolate(U)  linear;
}

snGradSchemes
{
    default         corrected; //limited 0.5;
}

fluxRequired
{
    default         no;
    p               ;
    Phi;
}


wallDist
{
    method meshWave;
}

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


solvers
{




    p
    {
        solver          GAMG;
        tolerance       1e-06;
        relTol          0.05;
        smoother        GaussSeidel;
        cacheAgglomeration true;
        nCellsInCoarsestLevel 10;
        agglomerator    faceAreaPair;
        mergeLevels     1;        
		nPreSweeps       0;    //course book suggests =0 if converging rapidly, pre 1/18/2016 has been =0, try 2
        nPostSweeps      2;

    }


    Phi
    {
        $p;     //added on 8/6/2015
    }

    "(U|k|epsilon|R|nuTilda|omega)"
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        nSweeps         2;
        tolerance       1e-05;
        relTol          0.1;
/*
        solver          PBiCG;
        preconditioner  DILU;
        tolerance       1e-05;
        relTol          0.1;
*/		
		
		
    }



}




SIMPLE
{
    nNonOrthogonalCorrectors 0;

    residualControl
    {
        p               1e-4;
        U               1e-4;
        "(k|epsilon|omega)" 1e-4;
    }
}


potentialFlow
{
    nNonOrthogonalCorrectors 15;
}

relaxationFactors  //values <1 = under relaxation = more solution smoothing per iteration = more iterations to converge but may help stability.
{
    fields
    {
        p               0.4;
    }

    equations
    {
        "(U|k|epsilon|omega)"               0.7;
    }

}

cache
{
    grad(U);
}
Attached Images
File Type: jpg fr_015_nopotential.jpg (47.6 KB, 11 views)
File Type: jpg fr_015_potential.jpg (48.7 KB, 11 views)
JasonG is offline   Reply With Quote

Old   January 8, 2018, 09:19
Default
  #12
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 add output of checkMesh and simpleFoam execution log-file (or a fragment of several iterations, if whole file is too large)?
alexeym is offline   Reply With Quote

Old   January 8, 2018, 09:37
Default
  #13
Member
 
Jason G.
Join Date: Sep 2009
Location: St. Louis, IL
Posts: 89
Rep Power: 16
JasonG is on a distinguished road
With this particular geometry I routinely have bad orthogonality in areas of my flow domain that I do not believe greatly impact my overall result. This particular mesh did achieve what I understand to be reasonable residuals. I am meshing with Ansys Workbench, so it is often difficult to achieve a mesh that doesn't trip errors via checkMesh.

checkMesh:

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5.x                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 5.x-197d9d3bf20a
Exec   : checkMesh
Date   : Jan 08 2018
Time   : 09:20:50
Host   : "TASNC-JASONG"
PID    : 476
I/O    : uncollated
Case   : /mnt/d/swap/OF5/fr_015_nopotential
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           634982
    internal points:  588346
    faces:            4185842
    internal faces:   4093322
    cells:            1841411
    faces per cell:   4.496097829
    boundary patches: 3
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     0
    prisms:        913520
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    927891
    polyhedra:     0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.

    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
    Patch               Faces    Points   Surface topology
    inlet_1             618      552      ok (non-closed singly connected)
    outlet_1            550      485      ok (non-closed singly connected)
    boundary            91352    45681    ok (non-closed singly connected)

Checking geometry...
    Overall domain bounding box (-0.8299974967 -3.337989933 2.248993217) (4.069987725 -1.782494624 6.698979796)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (2.743163375e-16 1.953206601e-17 -1.082883888e-16) OK.
    Max cell openness = 3.77981887e-15 OK.
    Max aspect ratio = 75.0854888 OK.
    Minimum face area = 8.506288038e-07. Maximum face area = 0.001358804478.  Face area magnitudes OK.
    Min volume = 9.482619624e-10. Max volume = 1.642345168e-05.  Total volume = 2.673134835.  Cell volumes OK.
    Mesh non-orthogonality Max: 84.22602788 average: 22.41349842
   *Number of severely non-orthogonal (> 70 degrees) faces: 2494.
    Non-orthogonality check OK.
  <<Writing 2494 non-orthogonal faces to set nonOrthoFaces
    Face pyramids OK.
 ***Max skewness = 4.515003866, 103 highly skew faces detected which may impair the quality of the results
  <<Writing 103 skew faces to set skewFaces
    Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End
log

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5.x                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 5.x-197d9d3bf20a
Exec   : simpleFoam -parallel
Date   : Jan 05 2018
Time   : 14:21:29
Host   : "TASNC-JASONG"
PID    : 1572
I/O    : uncollated
Case   : /mnt/d/swap/OF5/fr_015_nopotential
nProcs : 20
Slaves : 
19
(
"TASNC-JASONG.1573"
"TASNC-JASONG.1574"
"TASNC-JASONG.1575"
"TASNC-JASONG.1576"
"TASNC-JASONG.1577"
"TASNC-JASONG.1578"
"TASNC-JASONG.1579"
"TASNC-JASONG.1580"
"TASNC-JASONG.1581"
"TASNC-JASONG.1582"
"TASNC-JASONG.1583"
"TASNC-JASONG.1584"
"TASNC-JASONG.1585"
"TASNC-JASONG.1586"
"TASNC-JASONG.1587"
"TASNC-JASONG.1588"
"TASNC-JASONG.1589"
"TASNC-JASONG.1590"
"TASNC-JASONG.1591"
)

Pstream initialized with:
    floatTransfer      : 0
    nProcsSimpleSum    : 0
    commsType          : nonBlocking
    polling iterations : 0
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


SIMPLE: convergence criteria
    field p	 tolerance 0.0001
    field U	 tolerance 0.0001
    field "(k|epsilon|omega)"	 tolerance 0.0001

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RAS
Selecting RAS turbulence model kOmegaSST
Selecting patchDistMethod meshWave
RAS
{
    RASModel        kOmegaSST;
    turbulence      on;
    printCoeffs     on;
    alphaK1         0.85;
    alphaK2         1;
    alphaOmega1     0.5;
    alphaOmega2     0.856;
    gamma1          0.5555555556;
    gamma2          0.44;
    beta1           0.075;
    beta2           0.0828;
    betaStar        0.09;
    a1              0.31;
    b1              1;
    c1              10;
    F3              false;
}

No MRF models present

No finite volume options present


Starting time loop

--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_nopotential/system/controlDict" from line 18 to line 63
    Entry flowVelocity is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_nopotential/system/controlDict" from line 18 to line 63
    Entry velMag is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_nopotential/system/controlDict" from line 18 to line 63
    Entry pressure is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_nopotential/system/controlDict" from line 18 to line 63
    Entry turbulentKE is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_nopotential/system/controlDict" from line 18 to line 63
    Entry ke_inlet is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_nopotential/system/controlDict" from line 18 to line 63
    Entry turbulentOmega is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_nopotential/system/controlDict" from line 18 to line 63
    Entry omega_inlet is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_nopotential/system/controlDict" from line 18 to line 63
    Entry turbulentDissipation is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_nopotential/system/controlDict" from line 18 to line 63
    Entry dissipation_inlet is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_nopotential/system/controlDict" from line 18 to line 63
    Entry kinematicvis is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_nopotential/system/controlDict" from line 18 to line 63
    Entry density is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_nopotential/system/controlDict" from line 18 to line 63
    Entry pressure_inlet_p is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_nopotential/system/controlDict" from line 18 to line 63
    Entry RAS_MODEL is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_nopotential/system/controlDict" from line 18 to line 63
    Entry turb_on_off is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_nopotential/system/controlDict" from line 18 to line 63
    Entry RAS is not a dictionary
surfaceFieldValue inlet_1_ps:
    total faces  = 618
    total area   = 0.1271218506


Time = 1

smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.02319208891, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.06173220055, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 0.06357360331, No Iterations 2
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.04194346275, No Iterations 10
time step continuity errors : sum local = 0.6021147278, global = -0.003277611953, cumulative = -0.003277611953
smoothSolver:  Solving for omega, Initial residual = 1, Final residual = 0.0724688168, No Iterations 2
bounding omega, min: -394.3638772 max: 82363.76713 average: 74832.55168
smoothSolver:  Solving for k, Initial residual = 1, Final residual = 0.08488456301, No Iterations 2
bounding k, min: -1611.244139 max: 158173.6833 average: 141307.5341
ExecutionTime = 1.44 s  ClockTime = 1 s

Code:
Time = 2999

smoothSolver:  Solving for Ux, Initial residual = 7.301673623e-08, Final residual = 7.301673623e-08, No Iterations 0
smoothSolver:  Solving for Uy, Initial residual = 2.806229147e-07, Final residual = 2.806229147e-07, No Iterations 0
smoothSolver:  Solving for Uz, Initial residual = 1.080360349e-07, Final residual = 1.080360349e-07, No Iterations 0
GAMG:  Solving for p, Initial residual = 8.440299749e-07, Final residual = 8.440299749e-07, No Iterations 0
time step continuity errors : sum local = 0.0005352652103, global = 1.331025375e-07, cumulative = 0.7651170161
smoothSolver:  Solving for omega, Initial residual = 9.704782841e-06, Final residual = 9.704782841e-06, No Iterations 0
smoothSolver:  Solving for k, Initial residual = 0.001131603768, Final residual = 8.997397795e-05, No Iterations 4
ExecutionTime = 1821.81 s  ClockTime = 1871 s

Time = 3000

smoothSolver:  Solving for Ux, Initial residual = 7.276841407e-08, Final residual = 7.276841407e-08, No Iterations 0
smoothSolver:  Solving for Uy, Initial residual = 2.797101669e-07, Final residual = 2.797101669e-07, No Iterations 0
smoothSolver:  Solving for Uz, Initial residual = 1.075325789e-07, Final residual = 1.075325789e-07, No Iterations 0
GAMG:  Solving for p, Initial residual = 9.133011199e-07, Final residual = 9.133011199e-07, No Iterations 0
time step continuity errors : sum local = 0.0005791954494, global = 1.408492347e-07, cumulative = 0.7651171569
smoothSolver:  Solving for omega, Initial residual = 9.705228485e-06, Final residual = 9.705228485e-06, No Iterations 0
smoothSolver:  Solving for k, Initial residual = 0.001131631611, Final residual = 8.997609092e-05, No Iterations 4
ExecutionTime = 1822.86 s  ClockTime = 1872 s

    functionObjects::pressure pressure_tools1 writing field: static(p)
surfaceFieldValue inlet_1_ps write:
    areaAverage(inlet_1) of static(p) = 91.96423347

End

Finalising parallel run
JasonG is offline   Reply With Quote

Old   January 8, 2018, 17:03
Default
  #14
Member
 
Jason G.
Join Date: Sep 2009
Location: St. Louis, IL
Posts: 89
Rep Power: 16
JasonG is on a distinguished road
I just went back and re-ran with and without potentialFoam on OpenFOAM 3.0, and the results are both in close agreement.
JasonG is offline   Reply With Quote

Old   January 9, 2018, 07:31
Default
  #15
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,

Except from log-file you have posted finishes at 3000 iterations and it seems there is no convergence yet (otherwise execution is ended with "SIMPLE converged in ... iterations"). Though residuals for U, p, and omega fields looks fine, k residuals are high. Btw to which case posted log-file corresponds: potentialFoam initialised or not?

As a side note: your discretisation schemes/solver settings are not quite correct for the mesh you have. I would suggest:

- Use leastSquares for gradient.
- Also you can limit non-orthogonal correction for laplacian and interpolation.
- Use at least 2 non-orthogonal correctors in SIMPLE dictionary.

Yet, according to log your case converges without those additions.
alexeym is offline   Reply With Quote

Old   January 9, 2018, 08:59
Default
  #16
Member
 
Jason G.
Join Date: Sep 2009
Location: St. Louis, IL
Posts: 89
Rep Power: 16
JasonG is on a distinguished road
For these types of simulations I have been focused on expediency of result while maintaining a "reasonable" solution accuracy. For this model, I find that the level of convergence I typically get by 3000 iterations is sufficient.

The log file posted was the model without running potentialFoam. The log file after changing to leastSquares and setting nNonOrthogonalCorrectors to 2 is shown below:

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5.x                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 5.x-197d9d3bf20a
Exec   : simpleFoam -parallel
Date   : Jan 09 2018
Time   : 08:39:06
Host   : "TASNC-JASONG"
PID    : 1553
I/O    : uncollated
Case   : /mnt/d/swap/OF5/fr_015_solvertest
nProcs : 20
Slaves : 
19
(
"TASNC-JASONG.1554"
"TASNC-JASONG.1555"
"TASNC-JASONG.1556"
"TASNC-JASONG.1557"
"TASNC-JASONG.1558"
"TASNC-JASONG.1559"
"TASNC-JASONG.1560"
"TASNC-JASONG.1561"
"TASNC-JASONG.1562"
"TASNC-JASONG.1563"
"TASNC-JASONG.1564"
"TASNC-JASONG.1565"
"TASNC-JASONG.1566"
"TASNC-JASONG.1567"
"TASNC-JASONG.1568"
"TASNC-JASONG.1569"
"TASNC-JASONG.1570"
"TASNC-JASONG.1571"
"TASNC-JASONG.1572"
)

Pstream initialized with:
    floatTransfer      : 0
    nProcsSimpleSum    : 0
    commsType          : nonBlocking
    polling iterations : 0
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


SIMPLE: convergence criteria
    field p	 tolerance 0.0001
    field U	 tolerance 0.0001
    field "(k|epsilon|omega)"	 tolerance 0.0001

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RAS
Selecting RAS turbulence model kOmegaSST
Selecting patchDistMethod meshWave
RAS
{
    RASModel        kOmegaSST;
    turbulence      on;
    printCoeffs     on;
    alphaK1         0.85;
    alphaK2         1;
    alphaOmega1     0.5;
    alphaOmega2     0.856;
    gamma1          0.5555555556;
    gamma2          0.44;
    beta1           0.075;
    beta2           0.0828;
    betaStar        0.09;
    a1              0.31;
    b1              1;
    c1              10;
    F3              false;
}

No MRF models present

No finite volume options present


Starting time loop

--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_solvertest/system/controlDict" from line 18 to line 63
    Entry flowVelocity is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_solvertest/system/controlDict" from line 18 to line 63
    Entry velMag is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_solvertest/system/controlDict" from line 18 to line 63
    Entry pressure is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_solvertest/system/controlDict" from line 18 to line 63
    Entry turbulentKE is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_solvertest/system/controlDict" from line 18 to line 63
    Entry ke_inlet is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_solvertest/system/controlDict" from line 18 to line 63
    Entry turbulentOmega is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_solvertest/system/controlDict" from line 18 to line 63
    Entry omega_inlet is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_solvertest/system/controlDict" from line 18 to line 63
    Entry turbulentDissipation is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_solvertest/system/controlDict" from line 18 to line 63
    Entry dissipation_inlet is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_solvertest/system/controlDict" from line 18 to line 63
    Entry kinematicvis is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_solvertest/system/controlDict" from line 18 to line 63
    Entry density is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_solvertest/system/controlDict" from line 18 to line 63
    Entry pressure_inlet_p is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_solvertest/system/controlDict" from line 18 to line 63
    Entry RAS_MODEL is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_solvertest/system/controlDict" from line 18 to line 63
    Entry turb_on_off is not a dictionary
--> FOAM Warning : 
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 611
    Reading "/mnt/d/swap/OF5/fr_015_solvertest/system/controlDict" from line 18 to line 63
    Entry RAS is not a dictionary
surfaceFieldValue inlet_1_ps:
    total faces  = 618
    total area   = 0.1271218506


Time = 1

smoothSolver:  Solving for Ux, Initial residual = 0.1256681508, Final residual = 0.009642063592, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.1548427967, Final residual = 0.008559163645, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 0.1385402292, Final residual = 0.008226416344, No Iterations 2
GAMG:  Solving for p, Initial residual = 0.9589918949, Final residual = 0.02637324409, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.1931855671, Final residual = 0.003703265407, No Iterations 2
GAMG:  Solving for p, Initial residual = 0.02968140513, Final residual = 0.0009574056296, No Iterations 2
time step continuity errors : sum local = 0.1295320028, global = 0.008506271131, cumulative = 0.008506271131
smoothSolver:  Solving for omega, Initial residual = 1, Final residual = 0.07218038063, No Iterations 2
bounding omega, min: -602.143029 max: 119954.4881 average: 74424.48168
smoothSolver:  Solving for k, Initial residual = 1, Final residual = 0.08486662264, No Iterations 2
bounding k, min: -1943.408845 max: 182529.4365 average: 140734.7014
ExecutionTime = 1.64 s  ClockTime = 2 s



Time = 310

smoothSolver:  Solving for Ux, Initial residual = 0.0003381633688, Final residual = 2.66547049e-05, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.0007423103212, Final residual = 5.842461714e-05, No Iterations 4
smoothSolver:  Solving for Uz, Initial residual = 0.000679501686, Final residual = 5.296519615e-05, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.001335932479, Final residual = 2.234475842e-05, No Iterations 2
GAMG:  Solving for p, Initial residual = 0.0002037008352, Final residual = 8.973023203e-06, No Iterations 2
GAMG:  Solving for p, Initial residual = 4.489984976e-05, Final residual = 1.758124958e-06, No Iterations 4
time step continuity errors : sum local = 0.0003066761254, global = 1.384122755e-05, cumulative = 0.003400169057
smoothSolver:  Solving for omega, Initial residual = 0.000901147314, Final residual = 7.201171981e-05, No Iterations 4
smoothSolver:  Solving for k, Initial residual = 0.001388056077, Final residual = 0.000111335892, No Iterations 4
bounding k, min: -0.009181106753 max: 429020.3708 average: 1348.863558
ExecutionTime = 253.39 s  ClockTime = 259 s

    functionObjects::pressure pressure_tools1 writing field: static(p)
surfaceFieldValue inlet_1_ps write:
    areaAverage(inlet_1) of static(p) = 16.17761426
I stopped the solution early, as the areaAverage result indicates to me that the pressure field issue persists.

I find it puzzling that my simulation works fine with or without potentialFoam running first in OF3.0 and fine without potentialFoam in OF5.0, but running potentialFoam in OF5.0 seems to create problems. Any thoughts on if a change in potentialFoam occurred that makes it more sensitive to orthogonality and skewness?
JasonG is offline   Reply With Quote

Old   January 9, 2018, 09:16
Default
  #17
Member
 
Jason G.
Join Date: Sep 2009
Location: St. Louis, IL
Posts: 89
Rep Power: 16
JasonG is on a distinguished road
I just experimented with switching from the outletInlet pressure BC to zeroGradient, as shown below:

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

#include        "initialConditions"

//pressure_inlet_p	#calc "$p_inlet / $density";

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

internalField   uniform $pressure;

boundaryField
{
 
    "inlet.*"         
    {
/* 
		type            outletInlet;
        outletValue     $internalField;
        value           $internalField;
*/
        type            zeroGradient;
		}

    "outlet.*"     
      {
        type            fixedValue;
        value           $internalField;
    }
 

	"symmetry.*"       
    {
        type		symmetry;
    }
 
    "boundary.*"     
    {
        type            zeroGradient;
    }


}

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

This change seems to have resolved the discontinuous pressure field at the inlet. Something about using the outletInlet BC is causing my issues with potentialFoam in OF 5.0. I suppose I could stop using potentialFoam going forward, but I was under the impression it was a good practice to run this first in my simulations to initialize the problem.
JasonG is offline   Reply With Quote

Old   January 9, 2018, 16:10
Default
  #18
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
The difference between outletInlet BC in 3.0.x and 5.x is in the criterion for switch between Neumann and Dirichlet behaviour. In 5.x it uses phi >= 0, in 3.0.x it is phi > 0. potentialFoam implementation does not change much between these versions.

Maybe this inclusion of phi == 0 can provoke instability in your case.
alexeym is offline   Reply With Quote

Old   January 9, 2018, 17:04
Default
  #19
Member
 
Jason G.
Join Date: Sep 2009
Location: St. Louis, IL
Posts: 89
Rep Power: 16
JasonG is on a distinguished road
I think for now, I will just stop using potentialFoam when using the outletInlet or inletOutlet BCs.

Where do you advise looking for more information on output controls for pressure tools and surfaceFieldValue? Previously, my code for reading the static(p) field would output at a set interval that was independent of the solution write time. (Ex: start output of areaAverage for field static(p) on outlet_1 patch at 20 iterations every 20 iterations thereafter.)

Currently, I am only able to get it to write out at the same interval as the main output control in controlDict.

Your help has been much appreciated.

Code:
#include        "../0/initialConditions"

pressure_tools1
{
type                pressure; //pressureTools; renamed "pressure" in OF5.0
functionObjectLibs  ("libfieldFunctionObjects.so"); //("libutilityFunctionObjects.so");        
writeControl		outputTime;
rho		            rhoInf;
rhoInf              $density;// Value of the density(sslug/in^3) pstatic = lbf/in^2 
pRef				$pressure;
calcTotal no;   //yes for total, need to change reloadTotalP and inlet_avg_tot_p
calcCoeff no;

}



 reloadPcalc
    {
        type        readFields;
        functionObjectLibs ("libfieldFunctionObjects.so");
        //region          defaultRegion;
        enabled         yes;
        timeStart       20;
        timeEnd         10000;
        outputInterval 20; 
        fields
        (
         // "total(p)"
        "static(p)"
		
		);
    }


outlet_avg_p
    {
		

        type            surfaceFieldValue;
        libs            ("libfieldFunctionObjects.so");
		enabled         true;
        log             true;
		valueOutput     false;
		timeStart       20;
        timeEnd         10000;
        outputInterval	20;    
        writeFields     off;
        regionType      patch;
        name            outlet_1;
		surfaceFormat   none;
        operation       areaAverage;		
        fields
        (
    //        "total(p)"
			"static(p)"
        );
    }
JasonG is offline   Reply With Quote

Old   January 10, 2018, 08:12
Default
  #20
Member
 
Jason G.
Join Date: Sep 2009
Location: St. Louis, IL
Posts: 89
Rep Power: 16
JasonG is on a distinguished road
In case anyone else ever looks at this, here is what I ended up with for getting the average static pressure across my outlet patch every 10 time steps (starting after the first 20).

Code:
#include        "../0/initialConditions"

pressure_tools1
{
type                pressure; //pressureTools; renamed "pressure" in OF5.0
functionObjectLibs  ("libfieldFunctionObjects.so"); //("libutilityFunctionObjects.so");        
writeControl		outputTime;
rho		            rhoInf;
rhoInf              $density;// Value of the density(sslug/in^3) pstatic = lbf/in^2 
pRef				$pressure;
calcTotal no;   //yes for total, need to change reloadTotalP and inlet_avg_tot_p
calcCoeff no;

}



 reloadPcalc
    {
        type        readFields;
        functionObjectLibs ("libfieldFunctionObjects.so");
        enabled         yes;
        fields
        (
         // "total(p)"
        "static(p)"
		);
    }



outlet_avg_p
    {
		

        type            surfaceFieldValue;
        libs            ("libfieldFunctionObjects.so");
		enabled         true;
        log             true;
		valueOutput     false;
		timeStart       20;
		writeControl	timeStep;
		writeInterval	10;
        writeFields     off;
        regionType      patch;
        name            outlet_1;
		surfaceFormat   none;
        operation       areaAverage;		
        fields
        (
    //        "total(p)"
			"static(p)"
        );
    }
JasonG 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
activeBaffleVelocity boundary condition ? om3ro OpenFOAM Programming & Development 10 November 16, 2020 23:26
Inlet patch problems martyn88 OpenFOAM Running, Solving & CFD 6 April 21, 2017 18:34
[Commercial meshers] converting Fluent mesh to openfoam standard mesh deepesh OpenFOAM Meshing & Mesh Conversion 31 March 29, 2017 05:59
Error with Wmake skabilan OpenFOAM Installation 3 July 28, 2009 00:35
compressible two phase flow in CFX4.4 youngan CFX 0 July 1, 2003 23:32


All times are GMT -4. The time now is 04:42.