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

OpenFOAM v4.1 - farfield bc potentialFoam

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 23, 2016, 09:06
Default OpenFOAM v4.1 - farfield bc potentialFoam
  #1
Member
 
jey
Join Date: Nov 2016
Location: Greece
Posts: 30
Rep Power: 9
jeytsav is on a distinguished road
Dear OpenFOAMers

Nice to meet you! As this is my first post ever, I would like to thank everyone for all the help I've had until now through the forum.

I am trying to simulate a wing into a farfield domain with OpenFOAM v4.1 using Spalart-Allmaras turbulence model.

I begin my simulation with potentialFoam however the starting field that is generated seems a bit strange. I have noticed that the velocity only stays on the boundary and not advancing inside the domain.

Despite the weird initial field I get from potentialFoam, the solution manages to converge using simpleFoam. As you can see in the pictures below the velocity appears to advance towards the model at every iteration.

The provided pictures start from iteration 0 (potentialFoam) to iteration 8. Please note that this is an example just to demonstrate the problem and thats why the simulation stops at iteration 8.

I have also noticed that while running in OpenFoam v2.3, potentialFoam will lead to a more "advanced" velocity field reaching approximately to the middle of the domain (i.e. at the point of the model).

My question is why in version 4.1., potentialFoam gives this weird initial field that only advances when switching to simpleFoam? Such behavior leads in delaying the convergence. Does any one know if maybe this was done on purpose for a "smoother" approach of the flow towards the model so that to avoid sudden changes in pressure and velocity?

Or maybe I am missing something with the boundary conditions or the initialization of my case due to the changes from v2.3. to 4.1.

Below I have attached all the relevant info that in my opinion affect the case. Please let me know if anything else is missing.

Thank you in advance people

Kind regards


Boundary conditions

Code:
FoamFile
{
	version 2.0;
	format binary;
	class volVectorField;
	location "";
	object U;
}
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/


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

internalField uniform (68 0. 0. );


boundaryField
{
	domain
	{
		type uniformInletOutlet;
		uniformInletValue (68 0. 0.);
	}

Code:
FoamFile
{
	version 2.0;
	format binary;
	class volScalarField;
	location "";
	object p;
}
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/


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

internalField uniform 0.;


boundaryField
{
	domain
	{
		type outletInlet;
		value uniform 0.;
		outletValue uniform 0.;
	}


fvSchemes

Code:
FoamFile
{
	version 2.0;
	format binary;
	class dictionary;
	location "";
	object fvSchemes;
}
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/

ddtSchemes
{
    default         steadyState;
}

gradSchemes
{
    default         cellLimited leastSquares 1.0;
}

divSchemes
{
    default         none;
    div(phi,U)      bounded Gauss linearUpwindV grad(U);
    div(div(phi,U)) Gauss linear;
    div(phi,nuTilda) bounded Gauss linearUpwind grad(nuTilda);
    div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         no;
    p;
}

wallDist
{
    method meshWave;
}




fvSolution

Code:
FoamFile
{
	version 2.0;
	format binary;
	class dictionary;
	location "";
	object fvSolution;
}
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/

solvers
{

Phi
{
        solver           GAMG;
        tolerance        1e-10;
        relTol           0.01;
        smoother         DIC;
        nPreSweeps       0;
        nPostSweeps      2;
        cacheAgglomeration on;
        agglomerator     faceAreaPair;
        nCellsInCoarsestLevel 10;
        mergeLevels      1;
}

p
{
		$Phi
}


U
{
        solver           smoothSolver;
        smoother         GaussSeidel;
        tolerance        1e-10;
        relTol           0.1;
        nSweeps          1;
}

"(nuTilda)"
{
        solver           smoothSolver;
        smoother         GaussSeidel;
        tolerance        1e-10;
        relTol           0.01;
        nSweeps          2;
}
}

SIMPLE
{
    nNonOrthogonalCorrectors 1;

    residualControl
    {
        p               1e-5;
        U               1e-5;
		nuTilda         1e-5;
    }
    
}

potentialFlow
{
    nNonOrthogonalCorrectors 5;
    PhiRefCell 0;
    PhiRefValue 0;
    pRefCell 0;
    pRefValue 0;
}


relaxationFactors
{
    fields
    {
        p               0.3;
    }
    equations
    {
        U               0.7;
		nuTilda         0.7;
    }
}

cache
{
    grad(U);
}


potentialFoam .log file

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 4.1
Exec   : potentialFoam -writep
Date   : Nov 23 2016
Time   : 12:05:31
Host   : 
PID    : 17350
Case   : /.../workingDir/solving/cfdOnline
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

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

Create mesh for time = 0


potentialFlow: Operating solver in PISO mode

Reading velocity field U

Constructing pressure field p

Constructing velocity potential field Phi

No MRF models present


Calculating potential flow
GAMG:  Solving for Phi, Initial residual = 1, Final residual = 0.00388816, No Iterations 2
GAMG:  Solving for Phi, Initial residual = 0.106314, Final residual = 0.000331544, No Iterations 2
GAMG:  Solving for Phi, Initial residual = 0.0177188, Final residual = 0.000147161, No Iterations 2
GAMG:  Solving for Phi, Initial residual = 0.00488327, Final residual = 2.76832e-05, No Iterations 3
GAMG:  Solving for Phi, Initial residual = 0.00200897, Final residual = 1.32075e-05, No Iterations 2
GAMG:  Solving for Phi, Initial residual = 0.000594385, Final residual = 3.36361e-06, No Iterations 3
Continuity error = 8.48745e-06
Interpolated velocity error = 9.22832e-09

Calculating approximate pressure field
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.00697222, No Iterations 6
GAMG:  Solving for p, Initial residual = 0.228358, Final residual = 0.00092525, No Iterations 2
GAMG:  Solving for p, Initial residual = 0.0311716, Final residual = 0.000230878, No Iterations 2
GAMG:  Solving for p, Initial residual = 0.00662751, Final residual = 3.57362e-05, No Iterations 5
GAMG:  Solving for p, Initial residual = 0.00416093, Final residual = 2.32224e-05, No Iterations 2
GAMG:  Solving for p, Initial residual = 0.000999335, Final residual = 8.87307e-06, No Iterations 3
ExecutionTime = 519.23 s  ClockTime = 528 s

End


Field after potentialFoam (that tiny dot in the middle is the model)

potentialFoam.jpg potentialFoamSide.jpg


Field at iteration 8

simpleFoam-Iter8.jpg


Animation of field from 0 to 8 (click on images to see the .gif file)

anim1.gif anim2.gif
jeytsav is offline   Reply With Quote

Reply

Tags
boundary conditions, farfield bc, hemishpere, openfoam 4.1, potentialfoam

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
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 11:58
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 10 September 2, 2021 05:29
OpenFOAM Training Jan-Apr 2017, Virtual, London, Houston, Berlin cfd.direct OpenFOAM Announcements from Other Sources 0 September 21, 2016 11:50
OpenFOAM Foundation releases OpenFOAM 2.2.2 opencfd OpenFOAM Announcements from ESI-OpenCFD 0 October 14, 2013 07:18
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07


All times are GMT -4. The time now is 05:38.