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

Hydrofoil in Openfoam

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

Like Tree5Likes
  • 1 Post By Fouch
  • 1 Post By geth03
  • 1 Post By kandelabr
  • 1 Post By Fouch
  • 1 Post By Fouch

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 16, 2022, 15:02
Default Hydrofoil in Openfoam
  #1
New Member
 
Silver Blaze
Join Date: Dec 2021
Posts: 20
Rep Power: 4
silver.blaze is on a distinguished road
Dear Altruist,

I am quite new in OpenFOAM. I am doing turbulence flow pattern of NACA0012 hydrofoil. I have done it in Ansys Fluent. Now I am tring to solve it in OpenFOAM.com to validate the answer. I wanto share the procedures:

1. I have save the ansys fluent mesh in ASCII and used a command fluentMeshtoFoam and covert the mesh file.

2. I have updated the boundary file, p and U file. ( My Re = 2.98X10^6, nu = 0.001002991, rho = 997 kg/m^3, Speed = 3 m/s)

3. Now, simpleFoam command used and execute the case with this error (functionObjects::div contErr writing field: div(phi)). Then foam file generated.

4. Open the foam file in paraview. Extraxt Cp for lower and upper surface. Plot the Cp vs x/c. but didnot get the same result like Ansys, the difference is huge.

Now my questions are:

1. Whats wrong I have done?

2. should I update other files according my Re, V, nu value?

3. How can I solve this?

Kindly help me

My files :

P:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 0;

boundaryField
{
    inlet
    {
        type            freestreamPressure;
        freestreamValue $internalField;
    }

    outlet
    {
        type            freestreamPressure;
        freestreamValue $internalField;
    }

    hydrofoil-wall
    {
        type            zeroGradient;
    }

    frontAndBack
    {
        type            empty;
    }
}
U
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform (3 0 0);

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

    outlet
    {
        type            freestreamVelocity;
        freestreamValue $internalField;
    }

    hydrofoil-wall
    {
        type            fixedValue;
		value			uniform (0 0 0); 
    }

    frontAndBack
    {
        type            empty;
    }
}

// ************************************************************************* //
/
Transport Properties
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

transportModel  Newtonian;

rho             997;

nu              0.001002991;

// ************************************************************************* //
nut:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 0.14;

boundaryField
{
    inlet
    {
        type            freestream;
        freestreamValue uniform 0.14;
    }

    outlet
    {
        type            freestream;
        freestreamValue uniform 0.14;
    }

    hydrofoil-wall
    {
        type            nutUSpaldingWallFunction;
        value           uniform 0;
    }

    frontAndBack
    {
        type            empty;
    }
}

// ************************************************************************* //
nuTilda
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      nuTilda;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 0.14;

boundaryField
{
    inlet
    {
        type            freestream;
        freestreamValue uniform 0.14;
    }

    outlet
    {
        type            freestream;
        freestreamValue uniform 0.14;
    }

    hydrofoil-wall
    {
        type            fixedValue;
        value           uniform 0;
    }

    frontAndBack
    {
        type            empty;
    }
}

// ************************************************************************* //
silver.blaze is offline   Reply With Quote

Old   July 17, 2022, 13:04
Default
  #2
Member
 
Join Date: Feb 2020
Posts: 79
Rep Power: 6
Fouch is on a distinguished road
Hi,


Could you upload the whole case ?


BR
silver.blaze likes this.
Fouch is offline   Reply With Quote

Old   July 21, 2022, 17:29
Default
  #3
New Member
 
Silver Blaze
Join Date: Dec 2021
Posts: 20
Rep Power: 4
silver.blaze is on a distinguished road
Quote:
Originally Posted by Fouch View Post
Hi,


Could you upload the whole case ?


BR
Sorry for my late reply. Can I send it to you in the inbox?
silver.blaze is offline   Reply With Quote

Old   July 21, 2022, 18:13
Default
  #4
Senior Member
 
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 368
Rep Power: 8
geth03 is on a distinguished road
Can you provide more information?
1. Checkmesh result
2. Residuals
3. FvSchemes file
4. Fvsolution file
geth03 is offline   Reply With Quote

Old   July 21, 2022, 19:33
Default Hydrofoil in Openfoam
  #5
Senior Member
 
kandelabr's Avatar
 
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9
kandelabr is on a distinguished road
looks your 'nu' is the dynamic viscosity but simpleFoam takes kinematic viscosity and doesn't need density...
__________________
www.damogranlabs.com
kandelabr is offline   Reply With Quote

Old   July 22, 2022, 01:56
Default
  #6
New Member
 
Silver Blaze
Join Date: Dec 2021
Posts: 20
Rep Power: 4
silver.blaze is on a distinguished road
Quote:
Originally Posted by geth03 View Post
Can you provide more information?
1. Checkmesh result
2. Residuals
3. FvSchemes file
4. Fvsolution file
Thanks for your response. Here is the result.

1. checkMesh Result:
Code:
Mesh stats
    points:           60700
    internal points:  0
    faces:            120350
    internal faces:   59650
    cells:            30000
    faces per cell:   6
    boundary patches: 4
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     30000
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    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
    hydrofoil-wall      200      400      ok (non-closed singly connected)
    inlet               300      602      ok (non-closed singly connected)
    outlet              200      402      ok (non-closed singly connected)
    frontAndBackPlanes  60000    60700    ok (non-closed singly connected)

Checking faceZone topology for multiply connected surfaces...
    No faceZones found.

Checking basic cellZone addressing...
    No cellZones found.

Checking geometry...
    Overall domain bounding box (-4.851962 -5 -0.1790477) (10 5 0.1790477)
    Mesh has 2 geometric (non-empty/wedge) directions (1 1 0)
    Mesh has 2 solution (non-empty) directions (1 1 0)
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (-4.998397e-18 -7.594004e-19 8.795399e-19) OK.
    Max cell openness = 2.390399e-16 OK.
    Max aspect ratio = 178.1052 OK.
    Minimum face area = 9.417987e-06. Maximum face area = 0.2519532.  Face area magnitudes OK.
    Min volume = 3.372538e-06. Max volume = 0.04976618.  Total volume = 49.31023.  Cell volumes OK.
    Mesh non-orthogonality Max: 42.75253 average: 6.294525
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0.8074126 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End
2. Residuals:
I am sorry, I am not sure, where it is.



3. fvSchemes File:

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

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

ddtSchemes
{
	default	steadyState;
}
gradSchemes
{
	default	Gauss linear;
}
divSchemes
{
	default	            bounded Gauss upwind;
	div(phi,U)	        bounded Gauss upwind;
	div(phi,k)	        bounded Gauss upwind;
	
	//div(phi,epsilon)	bounded Gauss upwind;
    div(phi,omega)	bounded Gauss upwind;
	
	div(phi,R)          bounded Gauss upwind;	
	div(R)	    		Gauss linear;
	
	div(phi,nuTilda)   	bounded Gauss upwind;
	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;
	nRequired	true;
}
4. fvSolution File:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1812                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/ 
FoamFile
{
	version	2.0;
	class	dictionary;
	format	ascii;
	location	"system";
	object	fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
	U
	{
		solver	PBiCGStab;
		tolerance	1E-8;
		relTol	0.1;
		preconditioner	DILU;
		maxIter	100;
	}

	p
	{
		solver	GAMG;
		smoother	GaussSeidel;
		tolerance	1E-8;
		relTol	0.1;
		cacheAgglomeration	true;
		nFinestSweeps	2;
		maxIter	100;
		nPreSweeps	0;
		nPostSweeps	1;
		agglomerator	faceAreaPair;
		nCellsInCoarsestLevel	10;
		mergeLevels	1;
	}

	"(k|epsilon|nuTilda)"

	{
		relTol	0.1;
		preconditioner	DILU;
		tolerance	1E-8;
		maxIter	100;
		solver	PBiCGStab;
	}
	
	Phi
	{
		solver	GAMG;
		smoother	GaussSeidel;
		tolerance	1E-10;
		relTol	01;
		nPreSweeps	0;
		nPostSweeps	1;
		nFinestSweeps	1;
		nCellsInCoarsestLevel	10;
		mergeLevels	2;
		agglomerator	faceAreaPair;
		cacheAgglomeration	true;
		maxIter	100;
	}
}

SIMPLE
{
	nNonOrthogonalCorrectors	1;
	consistent	true;
	pRefCell	0;
	pRefValue	0;
	residualControl
	{
		p	1E-6;
		epsilon	1E-6;
		k	1E-6;
		U	1E-6;
	}
}

relaxationFactors
{
	p	0.75;
	epsilon	0.5;
	k	0.5;
	U	0.75;
}

potentialFlow
{
	nNonOrthogonalCorrectors	10;
	PhiRefCell	0;
	PhiRefValue	0;
}
silver.blaze is offline   Reply With Quote

Old   July 22, 2022, 01:58
Default
  #7
New Member
 
Silver Blaze
Join Date: Dec 2021
Posts: 20
Rep Power: 4
silver.blaze is on a distinguished road
Quote:
Originally Posted by kandelabr View Post
looks your 'nu' is the dynamic viscosity but simpleFoam takes kinematic viscosity and doesn't need density...
Thanks, I have updated it already, but there is no major change

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

transportModel  Newtonian;

//rho             998.2002;

nu              1e-6;
Kindly help me.
silver.blaze is offline   Reply With Quote

Old   July 22, 2022, 04:22
Default
  #8
Senior Member
 
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 368
Rep Power: 8
geth03 is on a distinguished road
If you use simplefoam you should track the residual behaviour. Look in the tutorials for simplefoam, you should find the files in one. You can also search in google how to do that, there is at least one video.

Gauss upwind is only first order accurate, so if your first run converges with upwind you can use this as starting point for second order schemes like gauss linearUpwindV grad(U) for div(phi,U) for example.

May i ask which turbulence model you use? If k-epsilon you did not upload the boundary files.

SimpleC algorithm: use 0.9 or 0.95 for all equation URF and optionally 0.9 for the fields.
geth03 is offline   Reply With Quote

Old   July 22, 2022, 04:29
Default
  #9
New Member
 
Silver Blaze
Join Date: Dec 2021
Posts: 20
Rep Power: 4
silver.blaze is on a distinguished road
Quote:
Originally Posted by geth03 View Post
If you use simplefoam you should track the residual behaviour. Look in the tutorials for simplefoam, you should find the files in one. You can also search in google how to do that, there is at least one video.

Gauss upwind is only first order accurate, so if your first run converges with upwind you can use this as starting point for second order schemes like gauss linearUpwindV grad(U) for div(phi,U) for example.

May i ask which turbulence model you use? If k-epsilon you did not upload the boundary files.

SimpleC algorithm: use 0.9 or 0.95 for all equation URF and optionally 0.9 for the fields.
Thanks for your quick response.

Yes, I am using k-epsilon.
Boundary file:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

4
(
    hydrofoil-wall
    {
        type            wall;
        inGroups        1(wall);
        nFaces          200;
        startFace       59650;
    }
    inlet
    {
        type            patch;
        nFaces          300;
        startFace       59850;
    }
    outlet
    {
        type            patch;
        nFaces          200;
        startFace       60150;
    }
    frontAndBackPlanes
    {
        type            empty;
        inGroups        1(empty);
        nFaces          60000;
        startFace       60350;
    }
)

// ************************************************************************* //
silver.blaze is offline   Reply With Quote

Old   July 22, 2022, 04:30
Default
  #10
New Member
 
Silver Blaze
Join Date: Dec 2021
Posts: 20
Rep Power: 4
silver.blaze is on a distinguished road
Quote:
Originally Posted by geth03 View Post
If you use simplefoam you should track the residual behaviour. Look in the tutorials for simplefoam, you should find the files in one. You can also search in google how to do that, there is at least one video.

Gauss upwind is only first order accurate, so if your first run converges with upwind you can use this as starting point for second order schemes like gauss linearUpwindV grad(U) for div(phi,U) for example.

May i ask which turbulence model you use? If k-epsilon you did not upload the boundary files.

SimpleC algorithm: use 0.9 or 0.95 for all equation URF and optionally 0.9 for the fields.
I can send you my case file.
silver.blaze is offline   Reply With Quote

Old   July 22, 2022, 04:35
Default
  #11
Senior Member
 
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 368
Rep Power: 8
geth03 is on a distinguished road
Quote:
Originally Posted by silver.blaze View Post
Thanks for your quick response.

Yes, I am using k-epsilon.
Boundary file:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

4
(
    hydrofoil-wall
    {
        type            wall;
        inGroups        1(wall);
        nFaces          200;
        startFace       59650;
    }
    inlet
    {
        type            patch;
        nFaces          300;
        startFace       59850;
    }
    outlet
    {
        type            patch;
        nFaces          200;
        startFace       60150;
    }
    frontAndBackPlanes
    {
        type            empty;
        inGroups        1(empty);
        nFaces          60000;
        startFace       60350;
    }
)

// ************************************************************************* //
Sorry, i meant the boundary conditions for k and epsilon.
silver.blaze likes this.
geth03 is offline   Reply With Quote

Old   July 22, 2022, 04:40
Default
  #12
New Member
 
Silver Blaze
Join Date: Dec 2021
Posts: 20
Rep Power: 4
silver.blaze is on a distinguished road
Quote:
Originally Posted by geth03 View Post
Sorry, i meant the boundary conditions for k and epsilon.
Sorry,
here it is:

k
Code:
FoamFile
{
	version             2.0;
	format              ascii;
	class               volScalarField;
	location            "0";
	object              k;
}


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

internalField	uniform 0.03375;

boundaryField
{
	hydrofoil-wall
	{
		type	kqRWallFunction;
		value	$internalField;
	}

	inlet
	{
		type	turbulentIntensityKineticEnergyInlet;
		value	$internalField;
		intensity	0.03;
	}
	outlet
	{
		type    zeroGradient;
		//type	inletOutlet;
		//inletValue	uniform 1.0;
	}
}
Epsilon
Code:
FoamFile
{
	version             2.0;
	format              ascii;
	class               volScalarField;
	location            "0";
	object              epsilon;
}


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

internalField	uniform 0.000102
;

boundaryField
{
	hydrofoil-wall
	{
		type	epsilonWallFunction;
		value	$internalField;
	}
	inlet
	{
		type	turbulentMixingLengthDissipationRateInlet;
		value	$internalField;
		mixingLength	0.3;
	}
	outlet
	{
		type	zeroGradient;
	}
}
silver.blaze is offline   Reply With Quote

Old   July 22, 2022, 14:46
Default
  #13
Senior Member
 
kandelabr's Avatar
 
Nejc
Join Date: Feb 2017
Location: Slovenia
Posts: 196
Rep Power: 9
kandelabr is on a distinguished road
Just out of curiosity, you can try using fvSchemes as recommended by wolfDynamics tutorials/courses (change omega to epsilon):

Code:
gradSchemes
{
    default cellLimited leastSquares 1.0;
    grad(U) cellLimited leastSquares 1.0;
}

divSchemes
{
    default         none;

    div(phi,U) bounded Gauss linearUpwindV grad(U);
    div(phi,k) bounded Gauss upwind;
    div(phi,omega) bounded Gauss upwind;
    div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear limited 0.5;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         limited 0.5;
}

wallDist
{
    method meshWave;
}
But my guess is that there's something wrong with your ParaView business.
If you need lift and drag, you can use the forceCoeffs functionObject but if you insist on using PV, please share that pipeline as I had similar enterprise there in the past and was stabbed in the back multiple times. I'm lucky I survived at all
silver.blaze likes this.
__________________
www.damogranlabs.com
kandelabr is offline   Reply With Quote

Old   July 22, 2022, 15:15
Default
  #14
New Member
 
Silver Blaze
Join Date: Dec 2021
Posts: 20
Rep Power: 4
silver.blaze is on a distinguished road
Quote:
Originally Posted by kandelabr View Post
Just out of curiosity, you can try using fvSchemes as recommended by wolfDynamics tutorials/courses (change omega to epsilon):

Code:
gradSchemes
{
    default cellLimited leastSquares 1.0;
    grad(U) cellLimited leastSquares 1.0;
}

divSchemes
{
    default         none;

    div(phi,U) bounded Gauss linearUpwindV grad(U);
    div(phi,k) bounded Gauss upwind;
    div(phi,omega) bounded Gauss upwind;
    div((nuEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear limited 0.5;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         limited 0.5;
}

wallDist
{
    method meshWave;
}
But my guess is that there's something wrong with your ParaView business.
If you need lift and drag, you can use the forceCoeffs functionObject but if you insist on using PV, please share that pipeline as I had similar enterprise there in the past and was stabbed in the back multiple times. I'm lucky I survived at all
Thanks for your valuable reply. I can send you the case file.
silver.blaze is offline   Reply With Quote

Old   July 22, 2022, 18:01
Default
  #15
Member
 
Join Date: Feb 2020
Posts: 79
Rep Power: 6
Fouch is on a distinguished road
Hi,


I ran your case with the following configuration file :


fvSchemes :


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

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

ddtSchemes
{
    default    steadyState;
}
gradSchemes
{
    default    Gauss linear;
}
divSchemes
{
    default                bounded Gauss upwind;
//    div(phi,U)            bounded Gauss upwind;
    div(phi,U)            bounded Gauss linearUpwind grad(U);
    div(phi,k)            bounded Gauss upwind;
    
    //div(phi,epsilon)    bounded Gauss upwind;
    div(phi,omega)    bounded Gauss upwind;
    
    div(phi,R)          bounded Gauss upwind;    
    div(R)                Gauss linear;
    
    div(phi,nuTilda)       bounded Gauss upwind;
    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;
    nRequired    true;
}
fvSolution :


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

solvers
{
    U
    {
        solver    PBiCGStab;
        tolerance    1E-8;
        relTol    0.1;
        preconditioner    DILU;
        maxIter    100;
        minIter    2;
    }

    p
    {
        solver    GAMG;
        smoother    GaussSeidel;
        tolerance    1E-8;
        relTol    0.1;
        cacheAgglomeration    true;
        nFinestSweeps    2;
        maxIter    100;
        nPreSweeps    0;
        nPostSweeps    1;
        agglomerator    faceAreaPair;
        nCellsInCoarsestLevel    10;
        mergeLevels    1;
    }

    "(k|epsilon|nuTilda)"
    //"(k|omega|nuTilda)"
    {
        relTol    0.1;
        preconditioner    DILU;
        tolerance    1E-8;
        maxIter    100;
        solver    PBiCGStab;
    }
    
    Phi
    {
        solver    GAMG;
        smoother    GaussSeidel;
        tolerance    1E-10;
        relTol    01;
        nPreSweeps    0;
        nPostSweeps    1;
        nFinestSweeps    1;
        nCellsInCoarsestLevel    10;
        mergeLevels    2;
        agglomerator    faceAreaPair;
        cacheAgglomeration    true;
        maxIter    100;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors    1;
    consistent    true;
    pRefCell    0;
    pRefValue    0;
    residualControl
    {
        p    1E-6;
        epsilon    1E-6;
        k    1E-6;
        U    1E-6;
    }
}

relaxationFactors
{
//    p    0.75;
    epsilon    0.5;
    k    0.5;
    U    0.75;
}

potentialFlow
{
    nNonOrthogonalCorrectors    10;
    PhiRefCell    0;
    PhiRefValue    0;
}
I did not compared the result with yours but I used a 2nd order schemes that should be more accurate.


Test it and tell me if the result is better.


Cheers.
silver.blaze likes this.
Fouch is offline   Reply With Quote

Old   July 27, 2022, 03:05
Default
  #16
New Member
 
Silver Blaze
Join Date: Dec 2021
Posts: 20
Rep Power: 4
silver.blaze is on a distinguished road
Quote:
Originally Posted by Fouch View Post
Hi,


I ran your case with the following configuration file :


fvSchemes :


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

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

ddtSchemes
{
    default    steadyState;
}
gradSchemes
{
    default    Gauss linear;
}
divSchemes
{
    default                bounded Gauss upwind;
//    div(phi,U)            bounded Gauss upwind;
    div(phi,U)            bounded Gauss linearUpwind grad(U);
    div(phi,k)            bounded Gauss upwind;
    
    //div(phi,epsilon)    bounded Gauss upwind;
    div(phi,omega)    bounded Gauss upwind;
    
    div(phi,R)          bounded Gauss upwind;    
    div(R)                Gauss linear;
    
    div(phi,nuTilda)       bounded Gauss upwind;
    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;
    nRequired    true;
}
fvSolution :


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

solvers
{
    U
    {
        solver    PBiCGStab;
        tolerance    1E-8;
        relTol    0.1;
        preconditioner    DILU;
        maxIter    100;
        minIter    2;
    }

    p
    {
        solver    GAMG;
        smoother    GaussSeidel;
        tolerance    1E-8;
        relTol    0.1;
        cacheAgglomeration    true;
        nFinestSweeps    2;
        maxIter    100;
        nPreSweeps    0;
        nPostSweeps    1;
        agglomerator    faceAreaPair;
        nCellsInCoarsestLevel    10;
        mergeLevels    1;
    }

    "(k|epsilon|nuTilda)"
    //"(k|omega|nuTilda)"
    {
        relTol    0.1;
        preconditioner    DILU;
        tolerance    1E-8;
        maxIter    100;
        solver    PBiCGStab;
    }
    
    Phi
    {
        solver    GAMG;
        smoother    GaussSeidel;
        tolerance    1E-10;
        relTol    01;
        nPreSweeps    0;
        nPostSweeps    1;
        nFinestSweeps    1;
        nCellsInCoarsestLevel    10;
        mergeLevels    2;
        agglomerator    faceAreaPair;
        cacheAgglomeration    true;
        maxIter    100;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors    1;
    consistent    true;
    pRefCell    0;
    pRefValue    0;
    residualControl
    {
        p    1E-6;
        epsilon    1E-6;
        k    1E-6;
        U    1E-6;
    }
}

relaxationFactors
{
//    p    0.75;
    epsilon    0.5;
    k    0.5;
    U    0.75;
}

potentialFlow
{
    nNonOrthogonalCorrectors    10;
    PhiRefCell    0;
    PhiRefValue    0;
}
I did not compared the result with yours but I used a 2nd order schemes that should be more accurate.


Test it and tell me if the result is better.


Cheers.
Sorry!

Could you please send me the case file?
silver.blaze is offline   Reply With Quote

Old   July 27, 2022, 16:06
Default
  #17
Member
 
Join Date: Feb 2020
Posts: 79
Rep Power: 6
Fouch is on a distinguished road
Could you explain what's wrong ?



Download link for the case : https://nextcloud.cm-en-transition.fr/s/kjnYJkF2RrHWbKR
silver.blaze likes this.
Fouch is offline   Reply With Quote

Old   July 27, 2022, 18:16
Default
  #18
New Member
 
Silver Blaze
Join Date: Dec 2021
Posts: 20
Rep Power: 4
silver.blaze is on a distinguished road
Quote:
Originally Posted by Fouch View Post
Could you explain what's wrong ?



Download link for the case : https://nextcloud.cm-en-transition.fr/s/kjnYJkF2RrHWbKR
Cp vs X/c graph's trend or pattern is okay, but the main problem is value. the value is not correct of Cp.
Kindly help me
silver.blaze is offline   Reply With Quote

Reply

Tags
openfoam, openfoam.com, paraview

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
OpenFOAM 5.0 Released CFDFoundation OpenFOAM Announcements from OpenFOAM Foundation 11 June 6, 2018 00:48
OpenFOAM Training Jan-Jul 2017, Virtual, London, Houston, Berlin CFDFoundation OpenFOAM Announcements from Other Sources 0 January 4, 2017 07:15
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 cfd.direct OpenFOAM Announcements from Other Sources 2 August 31, 2015 14:36
OpenFOAM Foundation releases OpenFOAM 2.2.2 opencfd OpenFOAM Announcements from ESI-OpenCFD 0 October 14, 2013 08:18
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 15:25


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