CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   OpenFoam help (https://www.cfd-online.com/Forums/openfoam-pre-processing/94536-openfoam-help.html)

Steinmann November 18, 2011 08:00

OpenFoam help
 
Dear all ,

I am totally new with OpenFoam CFD tool box..But unfortunately I was assigned a small project . I tried to understand and do on my own. And am Struck here.
A simple geometry with three different velocities are given. And he specified simpleFoam steady state newtonian fluid.
Actually my problem is here after running simpleFoam.
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model SpalartAllmaras


--> FOAM FATAL IO ERROR:
Unknown patchField type nutSpalartAllmarasWallFunction for patch type wall

Valid patchField types are :

64
(
advective
atmBoundaryLayerInletEpsilon
buoyantPressure
calculated
codedFixedValue
cyclic
cyclicSlip
directMapped
directMappedField
directMappedFixedInternalValue
directMappedFixedPushedInternalValue
directionMixed
empty
epsilonWallFunction
fan
fanPressure
fixedFluxPressure
fixedGradient
fixedInternalValue
fixedPressureCompressibleDensity
fixedValue
freestream
freestreamPressure
inletOutlet
inletOutletTotalTemperature
kappatJayatillekeWallFunction
kqRWallFunction
mixed
nonuniformTransformCyclic
nutLowReWallFunction
nutTabulatedWallFunction
nutURoughWallFunction
nutUSpaldingWallFunction
nutUWallFunction
nutkRoughWallFunction
nutkWallFunction
omegaWallFunction
oscillatingFixedValue
outletInlet
outletMappedUniformInlet
partialSlip
processor
processorCyclic
rotatingTotalPressure
selfContainedDirectMapped
sliced
slip
symmetryPlane
syringePressure
timeVaryingMappedFixedValue
timeVaryingTotalPressure
timeVaryingUniformFixedValue
totalPressure
totalTemperature
turbulentHeatFluxTemperature
turbulentInlet
turbulentIntensityKineticEnergyInlet
turbulentMixingLengthDissipationRateInlet
turbulentMixingLengthFrequencyInlet
uniformDensityHydrostaticPressure
uniformFixedValue
waveTransmissive
wedge
zeroGradient
)


file: /home/anirudh/Desktop/Ani/0/nut::boundaryField::top from line 43 to line 44.

From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&)
in file /home/opencfd/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 135.

FOAM exiting


I couldn't get this error !!
Could somebody help me in running this !

Thanks a ton in advance

Steinmann November 18, 2011 08:07

Later I found that in RASmodel : spallartAllamars
Turbulence : on
I am looking for laminar one
SO changed like this RASmodel : laminar
Turbulence : on
Is this entry a correct one ?
By running this ..I get following errors
anirudh@anirudh:~/Desktop/Ani$ simpleFoam
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.0.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.0.1-51f1de99a4bc
Exec : simpleFoam
Date : Nov 18 2011
Time : 14:01:11
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model laminar

SIMPLE: no convergence criteria found. Calculations will run for 4 steps.


Starting time loop

Time = 0.005



--> FOAM FATAL IO ERROR:
keyword div((nuEff*dev(T(grad(U))))) is undefined in dictionary "/home/anirudh/Desktop/Ani/system/fvSchemes::divSchemes"

file: /home/anirudh/Desktop/Ani/system/fvSchemes::divSchemes from line 31 to line 41.

From function dictionary::lookupEntry(const word&, bool, bool) const
in file db/dictionary/dictionary.C at line 400.

FOAM exiting

olivierG November 18, 2011 08:16

hello,

In 0/nut, you define a non valid boundary condition "nutSpalartAllmarasWallFunction" which is not valid in 2.0

You may change to "nutUSpaldingWallFunction", but you didn't give much info about your case.

Take a look at the tutorial case :
tutorials/incompressible/simpleFoam/airFoil2D/


regards,
olivier

Steinmann November 18, 2011 09:15

Dear Mr.Oliver,
Thank you for the reply....In my case, I should consider an Block Mesh like this with following boundary conditions. And I have to use simpleFoam(steady state one) in order to visualize the laminar flow. And the related graphs.The flow medium is considered as a newtonian one,for three different velocity cases v=1m/s, v=5m/s,v=10m/s
My Mesh is here :
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.0.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
(2 0 0)
(10 0 0)
(10 2 0)
(10 4 0)
(2 4 0)
(0 4 0)
(0 2 0)
(2 2 0)
(2 0 1)
(10 0 1)
(10 2 1)
(10 4 1)
(2 4 1)
(0 4 1)
(0 2 1)
(2 2 1)


);

blocks
(
hex (0 1 2 7 8 9 10 15) (20 20 1) simpleGrading (1 1 1)
hex (6 7 4 5 14 15 12 13) (20 20 1) simpleGrading (1 1 1)
hex (7 2 3 4 15 10 11 12) (20 20 1) simpleGrading (1 1 1)

);

edges
(
);

patches
(
wall top
(
(5 13 12 4)
(4 12 11 3)
)
wall bottomAndSide
(
(1 9 8 0)
(7 15 14 6)
(8 15 7 0)
)
/*patch middle
(
(15 12 4 7)
()
)*/
patch inlet
(
(6 14 13 5)
)
patch outlet
(
(2 3 11 10)
(1 2 10 9)
)
empty frontAndBack
(
(6 5 4 7)
(7 4 3 2)
(0 7 2 1)
(8 9 10 15)
(15 10 11 12)
(14 15 12 13)
)
/* wall side
(
(8 15 7 0)
)*/
);

mergePatchPairs
(
);

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

RASModel laminar;

turbulence on;

printCoeffs on;


// ************************************************** *********************** //
Velocity for my first case v=1m/s
/*--------------------------------*- C++ -*----------------------------------*\

| ========= | |

| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |

| \\ / O peration | Version: 2.0.1 |

| \\ / A nd | Web: http://www.openfoam.org |

| \\/ M anipulation | |

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



FoamFile

{

version 2.0;

format ascii;

class volVectorField;

object U;

}



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



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



internalField uniform (1 0 0);



boundaryField

{

inlet

{

type fixedValue;

value uniform (1 0 0);

}

top

{

type fixedValue;

value uniform (0 0 0);

}

outlet

{

type zeroGradient;

}

bottomAndSide

{

type fixedValue;

value uniform (0 0 0);

}



frontAndBack

{

type empty;

}



}





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

application simpleFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 195;

deltaT 0.05;

writeControl timeStep;

writeInterval 20;

purgeWrite 1;

writeFormat ascii;

writePrecision 6;

writeCompression uncompressed;

timeFormat general;

timePrecision 6;

runTimeModifiable true;



Here I have copy - pasted the main files ,so that you can view my case.
But when I ran it couldn't solve...

Please let me know, what other changes would be possible...

Thank you in advance..

olivierG November 18, 2011 09:26

For the error
Quote:

--> FOAM FATAL IO ERROR:
keyword div((nuEff*dev(T(grad(U))))) is undefined in dictionary "/home/anirudh/Desktop/Ani/system/fvSchemes::divSchemes"
You may add "div((nuEff*dev(T(grad(U))))) Gauss linear;" as a divSchemes in system/fvSchemes (take a look at tutorials ...)

and set turbulence off in Ras properties

regards,
olivier

Steinmann November 18, 2011 09:33

Hello Mr.Oliver

I have made these changes.....

div((nuEff*dev(T(grad(U))))) Gauss linear;
div((nuEff*dev(grad(U).T))) Gauss linear;

I ran it again....the following erros show up :
Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model laminar

SIMPLE: no convergence criteria found. Calculations will run for 195 steps.


Starting time loop

Time = 0.05

smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 8.60431e-07, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 8.90117e-07, No Iterations 2
GAMG: Solving for p, Initial residual = 1, Final residual = 0.0793663, No Iterations 4
time step continuity errors : sum local = 0.000476327, global = -1.21272e-19, cumulative = -1.21272e-19
ExecutionTime = 0.02 s ClockTime = 0 s

Time = 0.1

smoothSolver: Solving for Ux, Initial residual = 0.64159, Final residual = 0.0526798, No Iterations 2
smoothSolver: Solving for Uy, Initial residual = 0.619704, Final residual = 0.0470176, No Iterations 4
GAMG: Solving for p, Initial residual = 0.232835, Final residual = 0.0199787, No Iterations 3
time step continuity errors : sum local = 0.000714012, global = 9.7964e-19, cumulative = 8.58368e-19
ExecutionTime = 0.02 s ClockTime = 0 s

Time = 0.15

smoothSolver: Solving for Ux, Initial residual = 0.188418, Final residual = 0.00856207, No Iterations 4
smoothSolver: Solving for Uy, Initial residual = 0.290141, Final residual = 0.0194256, No Iterations 4


--> FOAM FATAL ERROR:
Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow.
Total flux : 100.795
Specified mass inflow : 2.40552
Specified mass outflow : 0
Adjustable mass outflow : 0


From function adjustPhi(surfaceScalarField& phi, const volVectorField& U,const volScalarField& p
in file cfdTools/general/adjustPhi/adjustPhi.C at line 116.

FOAM exiting


.......!!????

olivierG November 18, 2011 09:45

hello,

Try a more diffusive schem like gauss upwind, and initialise with potentialFoam or run with a lower velocity inlet, map the result and run again with bigger velocity.

regards,
olivier

Steinmann November 18, 2011 14:02

Hallo Mr.Oliver ,
Finally I ran and I got some solution.But not sure with Post-processing figures(Velocity and pressure ).
If you could give me your E-Mail Id here

I can send my files to you.
Wherein you could look up for what I have done ...
Thank you in advance

wiedangel January 26, 2012 10:44

Quote:

Originally Posted by Steinmann (Post 332662)
Dear all ,

I am totally new with OpenFoam CFD tool box..But unfortunately I was assigned a small project . I tried to understand and do on my own. And am Struck here.
A simple geometry with three different velocities are given. And he specified simpleFoam steady state newtonian fluid.
Actually my problem is here after running simpleFoam.
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model SpalartAllmaras


--> FOAM FATAL IO ERROR:
Unknown patchField type nutSpalartAllmarasWallFunction for patch type wall

Valid patchField types are :

64
(
advective
atmBoundaryLayerInletEpsilon
buoyantPressure
calculated
codedFixedValue
cyclic
cyclicSlip
directMapped
directMappedField
directMappedFixedInternalValue
directMappedFixedPushedInternalValue
directionMixed
empty
epsilonWallFunction
fan
fanPressure
fixedFluxPressure
fixedGradient
fixedInternalValue
fixedPressureCompressibleDensity
fixedValue
freestream
freestreamPressure
inletOutlet
inletOutletTotalTemperature
kappatJayatillekeWallFunction
kqRWallFunction
mixed
nonuniformTransformCyclic
nutLowReWallFunction
nutTabulatedWallFunction
nutURoughWallFunction
nutUSpaldingWallFunction
nutUWallFunction
nutkRoughWallFunction
nutkWallFunction
omegaWallFunction
oscillatingFixedValue
outletInlet
outletMappedUniformInlet
partialSlip
processor
processorCyclic
rotatingTotalPressure
selfContainedDirectMapped
sliced
slip
symmetryPlane
syringePressure
timeVaryingMappedFixedValue
timeVaryingTotalPressure
timeVaryingUniformFixedValue
totalPressure
totalTemperature
turbulentHeatFluxTemperature
turbulentInlet
turbulentIntensityKineticEnergyInlet
turbulentMixingLengthDissipationRateInlet
turbulentMixingLengthFrequencyInlet
uniformDensityHydrostaticPressure
uniformFixedValue
waveTransmissive
wedge
zeroGradient
)


file: /home/anirudh/Desktop/Ani/0/nut::boundaryField::top from line 43 to line 44.

From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&)
in file /home/opencfd/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 135.

FOAM exiting


I couldn't get this error !!
Could somebody help me in running this !

Thanks a ton in advance

are you using the 1.7.1 version? I had the same error which I solved by running under the version 2.0.1

Kanarya February 2, 2012 07:06

controlDict Error
 
Hi I am new in OpenFoam I am gettin this message

Can somebody help me?

Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#6
at twoPhaseEulerFoam.C:0
#7
in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/twoPhaseEulerFoam"
#8
in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/twoPhaseEulerFoam"
#9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10
in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/twoPhaseEulerFoam"
Floating point exception

Thanks,

Recep

Kanarya February 2, 2012 07:10

controlDict Error
 
Hi

I am gettin this message

Can somebody help me?

Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#6
at twoPhaseEulerFoam.C:0
#7
in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/twoPhaseEulerFoam"
#8
in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/twoPhaseEulerFoam"
#9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10
in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/twoPhaseEulerFoam"
Floating point exception

Thanks,

Recep

musahossein April 23, 2012 12:15

Quote:

Originally Posted by olivierG (Post 332673)
hello,

Try a more diffusive schem like gauss upwind, and initialise with potentialFoam or run with a lower velocity inlet, map the result and run again with bigger velocity.

regards,
olivier

There are two versions of the adjustPhi on the internet:

http://foam.sourceforge.net/docs/cpp/a03897_source.html

the other one is:
ftp://ftp.ux.uis.no/uis/x/OpenFOAM/OpenFOAM-1.5.../adjustPhi.C

It appears the someone made corrections to the second one -- there is no hardcoded limit on the flux ratio. Can some one verify which one is better and how it can be implemented in the OpenFoam that I have?

Thanks.


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