CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Adding Temperature field to IcoFoam (https://www.cfd-online.com/Forums/openfoam-programming-development/67097-adding-temperature-field-icofoam.html)

yapalparvi August 3, 2009 20:39

Adding Temperature field to IcoFoam
 
Hi,

I followed this tutorial on the wiki page
http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam

I ran my_icoFoam

and it gave me this message

FOAM Warning :
From function Field<Type>::Field(const word& keyword, const dictionary& dict, const label s)
in file /home/ramesh/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/Field.C at line 252
Reading "/home/ramesh/OpenFOAM/ramesh-1.5/run/my_icoFoam_cavity/0/T::movingWall" from line 25 to line 26
expected keyword 'uniform' or 'nonuniform', assuming deprecated Field format from Foam version 2.0.
--> FOAM Warning :
From function Field<Type>::Field(const word& keyword, const dictionary& dict, const label s)
in file /home/ramesh/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/Field.C at line 252
Reading "/home/ramesh/OpenFOAM/ramesh-1.5/run/my_icoFoam_cavity/0/T::fixedWalls" from line 31 to line 32
expected keyword 'uniform' or 'nonuniform', assuming deprecated Field format from Foam version 2.0.
Reading/calculating face flux field phi


Starting time loop

Time = 0.005

Courant Number mean: 0 max: 0
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 2.96338e-06, No Iterations 8
DILUPBiCG: Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0
DICPCG: Solving for p, Initial residual = 1, Final residual = 7.55402e-07, No Iterations 35
time step continuity errors : sum local = 5.03809e-09, global = 1.94884e-19, cumulative = 1.94884e-19
DICPCG: Solving for p, Initial residual = 0.523591, Final residual = 9.72352e-07, No Iterations 34
time step continuity errors : sum local = 1.07766e-08, global = 4.49324e-19, cumulative = 6.44208e-19



gradientInternalCoeffs cannot be called for a genericFvPatchField (actual type fixedvalue)
on patch movingWall of field T in file "/home/ramesh/OpenFOAM/ramesh-1.5/run/my_icoFoam_cavity/0/T"
You are probably trying to solve for a field with a generic boundary condition.

From function genericFvPatchField<Type>::gradientInternalCoeffs( ) const
in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 692.

FOAM exiting


any help would be appreciated. Thanks

Ramesh

sandy August 3, 2009 21:01

Yes, I guess my supervisor will also push me to do similar works in the next step :o...

yapalparvi August 3, 2009 22:02

Hi,

Thanks!. I have fixed the bug......


Ramesh

nishant_hull February 16, 2010 15:15

how did you fix the bug mate? I am also having similar bug when i tried a different boundary condition say parabolicVelocityInlet.

yapalparvi February 25, 2010 11:06

Can you please be more specific?. Share your code so that I can have a look

mike_jaworski March 1, 2010 21:06

The tutorial listings lacked the keyword "uniform" from the definition of the value in the boundary conditions.

The wiki's been edited to fix this - but the information is contained in the "warning" messages that were posted.

-Mike

Javed April 7, 2010 07:37

Hi friends,

I am facing sm pbm while compiling my own icoFOAM solver using wmake command..I m getting following pbm

javed@javed:~/OpenFOAM-RUN/OpenFOAM-1.6/applications/solvers/incompressible/icoFoam_temp$ wmake
make: *** No rule to make target `icoFoam.dep', needed by `Make/linuxGccDPOpt/dependencies'. Stop.


Please help me out.

nishant_hull April 7, 2010 09:09

Always use wclean before wmake. Or make sure there is no .dep file while doing wmake.

Nishant

Javed April 7, 2010 13:46

Thanks Nishant for the quick reply..

Now after doing all the changes as per given in http://openfoamwiki.net/index.php/How_to_add_temperature_to_icoFoam, I am not able to run it as follow...plz help friends...As i m running

javed@javed:~/OpenFOAM-RUN/OpenFOAM-1.6/tutorials/incompressible/icoFoam/mycavity$ myicoFoam

Case : /home/javed/OpenFOAM-RUN/OpenFOAM-1.6/tutorials/incompressible/icoFoam/mycavity
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

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

Create mesh for time = 0

// using new solver syntax:
p
{
solver PCG;
preconditioner
{
type DIC;
}
minIter 0;
maxIter 2000;
tolerance 1e-06;
relTol 0;
}

// using new solver syntax:
T
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-07;
relTol 0;
}

// using new solver syntax:
U
{
solver PBiCG;
preconditioner
{
type DILU;
}
minIter 0;
maxIter 500;
tolerance 1e-05;
relTol 0;
}

Reading transportProperties

Reading field p

Reading field U

Reading field T

Reading/calculating face flux field phi


Starting time loop

Time = 0.005

Courant Number mean: 0 max: 0


keyword preconditioner is undefined in dictionary "::preconditioner"

file: ::preconditioner from line 47 to line 47.

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

FOAM exiting

Plz help...

Thanks

nishant_hull April 7, 2010 16:37

As far as I can see, there is some mismatch in the format of the other fields and Temperature field. Change that and see if it works.
But If you dont get it right after that, then post the line 47 (lets make it line: 40-50) of the asked file here.
regards,
Nishant

gwierink April 8, 2010 02:47

Hi Javed,

Hmm, I think system/fvSolution should look something like this:


Code:

   
solvers
{
    p
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance      1e-06;
        relTol          0;
    }

    // GW Add a solver for T
    T
    {
        solver          BICCG;
        preconditioner  DILU; //GW or: none, GAMG, diagonal
        tolerance      1e-7;
        relTol          0;
    }

    U
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance      1e-05;
        relTol          0;
    }
}

PISO
{
    nCorrectors    2;
    nNonOrthogonalCorrectors 0;
    pRefCell        0;
    pRefValue      0;
}


afeworkimussie March 1, 2013 09:27

Quote:

Originally Posted by Javed (Post 253619)
Thanks Nishant for the quick reply..

Now after doing all the changes as per given in http://openfoamwiki.net/index.php/How_to_add_temperature_to_icoFoam, I am not able to run it as follow...plz help friends...As i m running

javed@javed:~/OpenFOAM-RUN/OpenFOAM-1.6/tutorials/incompressible/icoFoam/mycavity$ myicoFoam

Case : /home/javed/OpenFOAM-RUN/OpenFOAM-1.6/tutorials/incompressible/icoFoam/mycavity
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

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

Create mesh for time = 0

// using new solver syntax:
p
{
solver PCG;
preconditioner
{
type DIC;
}
minIter 0;
maxIter 2000;
tolerance 1e-06;
relTol 0;
}

// using new solver syntax:
T
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-07;
relTol 0;
}

// using new solver syntax:
U
{
solver PBiCG;
preconditioner
{
type DILU;
}
minIter 0;
maxIter 500;
tolerance 1e-05;
relTol 0;
}

Reading transportProperties

Reading field p

Reading field U

Reading field T

Reading/calculating face flux field phi


Starting time loop

Time = 0.005

Courant Number mean: 0 max: 0


keyword preconditioner is undefined in dictionary "::preconditioner"

file: ::preconditioner from line 47 to line 47.

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

FOAM exiting

Plz help...

Thanks

Hi

p
{
solver PCG;
preconditioner DIC;
minIter 0;
maxIter 2000;
tolerance 1e-06;
relTol 0;
}

This sort of presenting the fvSolution will solve the problem

Umut January 18, 2014 06:59

Hello,

I need to add energy equation to simpleFoam. There are some threads about it but they all used laminar model. Is there any model for turbulent, steady, incompressible (official or non) flow solver? Can you give me some hints?

Kind regards

Umut

akidess January 18, 2014 08:25

buoyantBoussinesqSimpleFoam

msman November 19, 2015 04:57

Hi, Ramesh

I have also getting the following error while adding temperature filed to my icoFoam solver.

Actually I am trying to use icoFoam solver for lagrangian particle tracking algorithm. when i run my model without adding temperature field, it works but when i add temperature filed, it doesn`t work


usman@hyazinth:~/OpenFOAM/usman-2.3.x/applications/solvers/colloidalFoam_T> wmake
Making dependency list for source file colloidalFoam.C
SOURCE=colloidalFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/nfs/opt/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude -I/nfs/opt/OpenFOAM/OpenFOAM-2.3.x/src/meshTools/lnInclude -I/nfs/opt/OpenFOAM/OpenFOAM-2.3.x/src/lagrangian/colloidalParticle/lnInclude -I/nfs/opt/OpenFOAM/OpenFOAM-2.3.x/src/lagrangian/basic/lnInclude -I../colloidalParticle/lnInclude -IlnInclude -I. -I/nfs/opt/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/nfs/opt/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/colloidalFoam.o
colloidalFoam.C: In function ‘int main(int, char**)’:
colloidalFoam.C:110:9: error: no matching function for call to ‘Foam::fvMatrix<double>::fvMatrix(Foam::tmp<Foam:: fvMatrix<Foam::Vector<double> > >)’
colloidalFoam.C:110:9: note: candidates are:
/nfs/opt/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude/fvMatrix.C:418:1: note: Foam::fvMatrix<Type>::fvMatrix(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&, Foam::Istream&) [with Type = double]
/nfs/opt/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude/fvMatrix.C:418:1: note: candidate expects 2 arguments, 1 provided
/nfs/opt/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude/fvMatrix.C:361:1: note: Foam::fvMatrix<Type>::fvMatrix(const Foam::tmp<Foam::fvMatrix<Type> >&) [with Type = double]
/nfs/opt/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude/fvMatrix.C:361:1: note: no known conversion for argument 1 from ‘Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > >’ to ‘const Foam::tmp<Foam::fvMatrix<double> >&’
/nfs/opt/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude/fvMatrix.C:330:1: note: Foam::fvMatrix<Type>::fvMatrix(const Foam::fvMatrix<Type>&) [with Type = double]
/nfs/opt/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude/fvMatrix.C:330:1: note: no known conversion for argument 1 from ‘Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > >’ to ‘const Foam::fvMatrix<double>&’
/nfs/opt/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude/fvMatrix.C:273:1: note: Foam::fvMatrix<Type>::fvMatrix(const Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh>&, const Foam::dimensionSet&) [with Type = double]
/nfs/opt/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude/fvMatrix.C:273:1: note: candidate expects 2 arguments, 1 provided
/nfs/opt/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude/readPISOControls.H:3:15: warning: unused variable ‘nOuterCorr’ [-Wunused-variable]
/nfs/opt/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude/readPISOControls.H:12:16: warning: unused variable ‘momentumPredictor’ [-Wunused-variable]
/nfs/opt/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude/readPISOControls.H:15:16: warning: unused variable ‘transonic’ [-Wunused-variable]
make: *** [Make/linux64GccDPOpt/colloidalFoam.o] Error 1


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