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

adding compressible option to ptot

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

Like Tree2Likes
  • 1 Post By S.P.
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 20, 2013, 17:55
Default adding compressible option to ptot
  #1
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
in ptot(below) there implemented only incompressible and subsonic compressible formulas.
how can add supersonic compressible formula too by an option like -compressible?
Code:
if (p.dimensions() == dimensionSet(0, 2, -2, 0, 0))
            {
                volScalarField ptot
                (
                    IOobject
                    (
                        "ptot",
                        runTime.timeName(),
                        mesh,
                        IOobject::NO_READ
                    ),
                    p + 0.5*magSqr(U)
                );
                ptot.write();
            }
            else
            {
                IOobject rhoheader
                (
                    "rho",
                    runTime.timeName(),
                    mesh,
                    IOobject::MUST_READ
                );

                // Check rho exists
                if (rhoheader.headerOk())
                {
                    Info<< "    Reading rho" << endl;
                    volScalarField rho(rhoheader, mesh);

                    volScalarField ptot
                    (
                        IOobject
                        (
                            "ptot",
                            runTime.timeName(),
                            mesh,
                            IOobject::NO_READ
                        ),
                        p + 0.5*rho*magSqr(U)
                    );
                    ptot.write();
                }
                else
                {
                    Info<< "    No rho" << endl;
                }
            }
        }
        else
        {
            Info<< "    No p or U" << endl;
        }
this part of totalPressure needs to be added:
Code:
if (gamma_ > 1.0)
        {
            scalar gM1ByG = (gamma_ - 1.0)/gamma_;

            operator==
            (
                p0p
               /pow
                (
                    (1.0 + 0.5*psip*gM1ByG*(1.0 - pos(phip))*magSqr(Up)),
                    1.0/gM1ByG
                )
            );
        }
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   June 21, 2013, 08:49
Default
  #2
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
I modified the ptot folder,as attached,but this error says what?!
Code:
/opt/openfoam220/src/OpenFOAM/lnInclude/sphericalTensorFieldField.C:49:1: note: template<template<class> class Field> Foam::tmp<Foam::FieldField<Field, Foam::SphericalTensor<double> > > Foam::operator/(const Foam::FieldField<Field, double>&, const Foam::FieldField<Field, Foam::SphericalTensor<double> >&)
/opt/openfoam220/src/OpenFOAM/lnInclude/sphericalTensorFieldField.C:49:1: note: template<template<class> class Field> Foam::tmp<Foam::FieldField<Field, Foam::SphericalTensor<double> > > Foam::operator/(const Foam::FieldField<Field, double>&, const Foam::tmp<Foam::FieldField<Field, Foam::SphericalTensor<double> > >&)
/opt/openfoam220/src/OpenFOAM/lnInclude/sphericalTensorFieldField.C:49:1: note: template<template<class> class Field> Foam::tmp<Foam::FieldField<Field, Foam::SphericalTensor<double> > > Foam::operator/(const Foam::tmp<Foam::FieldField<Field, double> >&, const Foam::FieldField<Field, Foam::SphericalTensor<double> >&)
/opt/openfoam220/src/OpenFOAM/lnInclude/sphericalTensorFieldField.C:49:1: note: template<template<class> class Field> Foam::tmp<Foam::FieldField<Field, Foam::SphericalTensor<double> > > Foam::operator/(const Foam::tmp<Foam::FieldField<Field, double> >&, const Foam::tmp<Foam::FieldField<Field, Foam::SphericalTensor<double> > >&)
/opt/openfoam220/src/OpenFOAM/lnInclude/sphericalTensorFieldField.C:50:1: note: template<template<class> class Field> Foam::tmp<Foam::FieldField<Field, Foam::SphericalTensor<double> > > Foam::operator/(const scalar&, const Foam::FieldField<Field, Foam::SphericalTensor<double> >&)
/opt/openfoam220/src/OpenFOAM/lnInclude/sphericalTensorFieldField.C:50:1: note: template<template<class> class Field> Foam::tmp<Foam::FieldField<Field, Foam::SphericalTensor<double> > > Foam::operator/(const scalar&, const Foam::tmp<Foam::FieldField<Field, Foam::SphericalTensor<double> > >&)
/opt/openfoam220/src/OpenFOAM/lnInclude/sphericalTensorFieldField.C:50:1: note: template<template<class> class Field> Foam::tmp<Foam::FieldField<Field, Foam::SphericalTensor<double> > > Foam::operator/(const Foam::FieldField<Field, double>&, const sphericalTensor&)
/opt/openfoam220/src/OpenFOAM/lnInclude/sphericalTensorFieldField.C:50:1: note: template<template<class> class Field> Foam::tmp<Foam::FieldField<Field, Foam::SphericalTensor<double> > > Foam::operator/(const Foam::tmp<Foam::FieldField<Field, double> >&, const sphericalTensor&)
/opt/openfoam220/src/OpenFOAM/lnInclude/tensorFieldField.C:63:1: note: template<template<class> class Field> Foam::tmp<Foam::FieldField<Field, Foam::Vector<double> > > Foam::operator/(const Foam::FieldField<Field, Foam::Vector<double> >&, const Foam::FieldField<Field, Foam::Tensor<double> >&)
/opt/openfoam220/src/OpenFOAM/lnInclude/tensorFieldField.C:63:1: note: template<template<class> class Field> Foam::tmp<Foam::FieldField<Field, Foam::Vector<double> > > Foam::operator/(const Foam::FieldField<Field, Foam::Vector<double> >&, const Foam::tmp<Foam::FieldField<Field, Foam::Tensor<double> > >&)
/opt/openfoam220/src/OpenFOAM/lnInclude/tensorFieldField.C:63:1: note: template<template<class> class Field> Foam::tmp<Foam::FieldField<Field, Foam::Vector<double> > > Foam::operator/(const Foam::tmp<Foam::FieldField<Field, Foam::Vector<double> > >&, const Foam::FieldField<Field, Foam::Tensor<double> >&)
/opt/openfoam220/src/OpenFOAM/lnInclude/tensorFieldField.C:63:1: note: template<template<class> class Field> Foam::tmp<Foam::FieldField<Field, Foam::Vector<double> > > Foam::operator/(const Foam::tmp<Foam::FieldField<Field, Foam::Vector<double> > >&, const Foam::tmp<Foam::FieldField<Field, Foam::Tensor<double> > >&)
/opt/openfoam220/src/OpenFOAM/lnInclude/tensorFieldField.C:64:1: note: template<template<class> class Field> Foam::tmp<Foam::FieldField<Field, Foam::Vector<double> > > Foam::operator/(const vector&, const Foam::FieldField<Field, Foam::Tensor<double> >&)
/opt/openfoam220/src/OpenFOAM/lnInclude/tensorFieldField.C:64:1: note: template<template<class> class Field> Foam::tmp<Foam::FieldField<Field, Foam::Vector<double> > > Foam::operator/(const vector&, const Foam::tmp<Foam::FieldField<Field, Foam::Tensor<double> > >&)
/opt/openfoam220/src/OpenFOAM/lnInclude/tensorFieldField.C:64:1: note: template<template<class> class Field> Foam::tmp<Foam::FieldField<Field, Foam::Vector<double> > > Foam::operator/(const Foam::FieldField<Field, Foam::Vector<double> >&, const tensor&)
/opt/openfoam220/src/OpenFOAM/lnInclude/tensorFieldField.C:64:1: note: template<template<class> class Field> Foam::tmp<Foam::FieldField<Field, Foam::Vector<double> > > Foam::operator/(const Foam::tmp<Foam::FieldField<Field, Foam::Vector<double> > >&, const tensor&)
/opt/openfoam220/src/OpenFOAM/lnInclude/zeroI.H:72:13: note: template<class Type> Foam::zero Foam::operator/(const Foam::zero&, const Type&)
/opt/openfoam220/src/OpenFOAM/lnInclude/oneI.H:48:13: note: template<class Type> Type Foam::operator/(const Foam::one&, const Type&)
/opt/openfoam220/src/OpenFOAM/lnInclude/oneI.H:55:20: note: template<class Type> const Type& Foam::operator/(const Type&, const Foam::one&)
make: *** [Make/linux64GccDPOpt/ptot.o] Error 1
I wnat to replace it:
Code:
p*pow((1.0 + 0.5*psip*gM1ByG**magSqr(Up)),
                    gM1ByG)
why there are psip instead of psi,phip instead of phi and Up instead of U in totalPressure BC?
Attached Files
File Type: gz ptot.tar.gz (1.7 KB, 1 views)
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.

Last edited by immortality; June 21, 2013 at 11:30.
immortality is offline   Reply With Quote

Old   June 21, 2013, 11:30
Default
  #3
New Member
 
Sebastian P.
Join Date: Oct 2011
Location: Germany
Posts: 3
Rep Power: 15
S.P. is on a distinguished road
Hi Ehsan,

I think you can't use the equation from the totalPressure-BC to calculate "ptot", because the solver doesn't write the fields "psip" and "phip".

If your specific heat capacities c_p and c_v are constant, you can compute the total pressure for compressible flow as a function of Mach-number and heat capacity ratio.

Code:
p * pow(1 + 0.5*(gamma - 1.0)*sqr(Ma) , (gamma/(gamma - 1.0)) )
You only have to modify the ptot-utility to read the Mach-number field and the constant scalar gamma.

Regards,
Sebastian
immortality likes this.
S.P. is offline   Reply With Quote

Old   June 21, 2013, 12:58
Default
  #4
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
thanks Sebastian
in my case flow reachs to 1.5 in maximum.is the difference considerable in your opinion for going to change the code at all?
because as you notified me about gamma importance by C_p and C_v,I use JANAF that makes C_p variable with T and also don't have C_v to compute gamma and if use gamma equal to 1.4 it will be another approximation too.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   June 21, 2013, 13:09
Default
  #5
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
and if I want to apply your nice suggestion I modified it with gamma=1.4 and Mach field but still an error occurs:
Code:
Making dependency list for source file ptot.C
SOURCE=ptot.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/opt/openfoam220/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/ptot.o
ptot.C: In function ‘int main(int, char**)’:
ptot.C:137:55: error: ‘Ma’ was not declared in this scope
make: *** [Make/linux64GccDPOpt/ptot.o] Error 1
while I have added Ma field to the code.
Attached Files
File Type: gz ptot.tar.gz (1.7 KB, 2 views)
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   June 21, 2013, 15:47
Default
  #6
New Member
 
Sebastian P.
Join Date: Oct 2011
Location: Germany
Posts: 3
Rep Power: 15
S.P. is on a distinguished road
What do you mean with:
Quote:
in my case flow reachs to 1.5 in maximum
Mach-number?

In that case I would say that the difference between incompressible computation of "ptot" and compressible computation mentioned above isn't negligible. In my radial compressor case the difference was around 8%, at an area averaged Ma-number of 0.8.

I am not sure if the assumption of a constant gamma is valid if c_p = f(T).
Here you find an alternative equation for "ptot", which is implemented in CFX and considers the temperature dependence of c_p. However I don't know where this formulation comes from.

http://www.sharcnet.ca/Software/Flue....html#i1298760
(see 1.1.3.12.2.)

Indeed you need the c_p field from the thermo class.

In your code you forgot to define the volScalarField Ma, like the other fields. Anyway I got some other errors during compilation.

Here is my working code: (note that you have to define gamma in the thermophysicalProperties dict)
Attached Files
File Type: gz ptotCompressible.tar.gz (1.5 KB, 6 views)
S.P. is offline   Reply With Quote

Old   June 21, 2013, 16:13
Default
  #7
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
thanks.but I can't download the code.this is the error with gzip:
Code:
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   June 21, 2013, 16:26
Default
  #8
New Member
 
Sebastian P.
Join Date: Oct 2011
Location: Germany
Posts: 3
Rep Power: 15
S.P. is on a distinguished road
Uff... I get this error too but it works fine with tar xf

EDIT: Now it should work...
S.P. is offline   Reply With Quote

Old   June 21, 2013, 16:50
Default
  #9
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
thanks again.in Mach file code this part exists:
Code:
autoPtr<fluidThermo> thermo
            (
                fluidThermo::New(mesh)
            );

            volScalarField Cp(thermo->Cp());
            volScalarField Cv(thermo->Cv());

            MachPtr.set
            (
                new volScalarField
                (
                    IOobject
                    (
                        "Ma",
                        runTime.timeName(),
                        mesh
                    ),
                    mag(U)/(sqrt((Cp/Cv)*(Cp - Cv)*thermo->T()))
                )
could we use Cp and Cv in ptot code too?
in my case I don't have R and Cv in thermophysics dictionary thus I think Mach command uses Cp and Cv.if it be correct the work will be more accurate.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   June 22, 2013, 12:56
Default
  #10
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
I wrote the required equation for total_pressure :
Code:
p0=p*pow(1+magSqr(U)/(2*Cp*T),Cp/(Cp-Cv))
if we can modify rhoCentralFoam so that writes Cp and Cv in each time folder we after that can use that formula in ptotCompressible to have accurate totalP.
then this stages are needed to be done:
1)modifynig the solver(in my case rhoCentralFoamGasCont) to write Cp and Cv
2)modifying ptotComp to use above equation to compute p0
3)writing BC's according to Cp and Cv(I do it myself )
I think 1 is more difficult than all.if it can be done no much more things remain to do.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   June 23, 2013, 05:15
Default
  #11
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
I added two fields for Cp and Cv and write commands in the solver without success
its the error:
Code:
ehsan@Ehsan-com:~/Desktop/Solvers/rhoCentralFoamGasCont$ wmake
Making dependency list for source file rhoCentralFoamModified.C
SOURCE=rhoCentralFoamModified.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/opt/openfoam220/applications/solvers/compressible/rhoCentralFoam/BCs/lnInclude -I/opt/openfoam220/src/finiteVolume/lnInclude -I/opt/openfoam220/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam220/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam220/src/turbulenceModels/compressible/turbulenceModel -I/opt/openfoam220/src/dynamicMesh/lnInclude -I/opt/openfoam220/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/rhoCentralFoamModified.o
In file included from rhoCentralFoamModified.C:47:0:
createFields.H: In function ‘int main(int, char**)’:
createFields.H:102:1: error: no matching function for call to ‘Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >)’
createFields.H:102:1: note: candidates are:
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:605:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Foam::GeometricField<Type, PatchField, GeoMesh>&, const wordList&, const wordList&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::wordList = Foam::List<Foam::word>]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:605:1: note:   candidate expects 4 arguments, 2 provided
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:570:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Foam::GeometricField<Type, PatchField, GeoMesh>&, const Foam::word&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:570:1: note:   candidate expects 3 arguments, 2 provided
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:540:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::word&, const Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh> >&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:540:1: note:   no known conversion for argument 1 from ‘Foam::IOobject’ to ‘const Foam::word&’
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:507:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::word&, const Foam::GeometricField<Type, PatchField, GeoMesh>&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:507:1: note:   no known conversion for argument 1 from ‘Foam::IOobject’ to ‘const Foam::word&’
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:475:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Foam::GeometricField<Type, PatchField, GeoMesh>&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:475:1: note:   no known conversion for argument 2 from ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >’ to ‘const Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&’
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:444:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh> >&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:444:1: note:   candidate expects 1 argument, 2 provided
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:412:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::GeometricField<Type, PatchField, GeoMesh>&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:412:1: note:   candidate expects 1 argument, 2 provided
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:371:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dictionary&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:371:1: note:   candidate expects 3 arguments, 2 provided
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:331:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:331:1: note:   no known conversion for argument 2 from ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >’ to ‘const Mesh& {aka const Foam::fvMesh&}’
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:304:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dimensionSet&, const Foam::Field<TypeR>&, const Foam::PtrList<PatchField<Type> >&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:304:1: note:   candidate expects 5 arguments, 2 provided
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:274:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dimensioned<Form>&, const wordList&, const wordList&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh, Foam::wordList = Foam::List<Foam::word>]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:274:1: note:   candidate expects 5 arguments, 2 provided
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:245:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dimensioned<Form>&, const Foam::word&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:245:1: note:   candidate expects 4 arguments, 2 provided
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:217:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dimensionSet&, const wordList&, const wordList&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh, Foam::wordList = Foam::List<Foam::word>]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:217:1: note:   candidate expects 5 arguments, 2 provided
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:187:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dimensionSet&, const Foam::word&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:187:1: note:   candidate expects 4 arguments, 2 provided
createFields.H:115:1: error: no matching function for call to ‘Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >)’
createFields.H:115:1: note: candidates are:
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:605:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Foam::GeometricField<Type, PatchField, GeoMesh>&, const wordList&, const wordList&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::wordList = Foam::List<Foam::word>]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:605:1: note:   candidate expects 4 arguments, 2 provided
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:570:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Foam::GeometricField<Type, PatchField, GeoMesh>&, const Foam::word&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:570:1: note:   candidate expects 3 arguments, 2 provided
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:540:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::word&, const Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh> >&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:540:1: note:   no known conversion for argument 1 from ‘Foam::IOobject’ to ‘const Foam::word&’
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:507:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::word&, const Foam::GeometricField<Type, PatchField, GeoMesh>&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:507:1: note:   no known conversion for argument 1 from ‘Foam::IOobject’ to ‘const Foam::word&’
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:475:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Foam::GeometricField<Type, PatchField, GeoMesh>&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:475:1: note:   no known conversion for argument 2 from ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >’ to ‘const Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&’
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:444:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::tmp<Foam::GeometricField<Type, PatchField, GeoMesh> >&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:444:1: note:   candidate expects 1 argument, 2 provided
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:412:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::GeometricField<Type, PatchField, GeoMesh>&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:412:1: note:   candidate expects 1 argument, 2 provided
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:371:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dictionary&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:371:1: note:   candidate expects 3 arguments, 2 provided
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:331:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:331:1: note:   no known conversion for argument 2 from ‘Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >’ to ‘const Mesh& {aka const Foam::fvMesh&}’
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:304:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dimensionSet&, const Foam::Field<TypeR>&, const Foam::PtrList<PatchField<Type> >&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:304:1: note:   candidate expects 5 arguments, 2 provided
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:274:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dimensioned<Form>&, const wordList&, const wordList&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh, Foam::wordList = Foam::List<Foam::word>]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:274:1: note:   candidate expects 5 arguments, 2 provided
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:245:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dimensioned<Form>&, const Foam::word&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:245:1: note:   candidate expects 4 arguments, 2 provided
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:217:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dimensionSet&, const wordList&, const wordList&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh, Foam::wordList = Foam::List<Foam::word>]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:217:1: note:   candidate expects 5 arguments, 2 provided
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:187:1: note: Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField(const Foam::IOobject&, const Mesh&, const Foam::dimensionSet&, const Foam::word&) [with Type = Foam::Vector<double>, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh, Foam::GeometricField<Type, PatchField, GeoMesh>::Mesh = Foam::fvMesh]
/opt/openfoam220/src/OpenFOAM/lnInclude/GeometricField.C:187:1: note:   candidate expects 4 arguments, 2 provided
createFields.H:11:23: warning: unused variable ‘T’ [-Wunused-variable]
/opt/openfoam220/src/finiteVolume/lnInclude/readTimeControls.H:32:12: warning: unused variable ‘adjustTimeStep’ [-Wunused-variable]
/opt/openfoam220/src/finiteVolume/lnInclude/readTimeControls.H:35:8: warning: unused variable ‘maxCo’ [-Wunused-variable]
/opt/openfoam220/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [-Wunused-variable]
make: *** [Make/linux64GccDPOpt/rhoCentralFoamModified.o] Error 1
Attached Files
File Type: gz rhoCentralFoamGasCont.tar.gz (4.3 KB, 0 views)
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   June 23, 2013, 06:07
Default
  #12
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
I have corrected it.a mistake in the type of field.it should be scalar field.
the corrected solver compiles well and is attached.but still it doesn't write Cp and Cv(only writes files that contain dictionaries instead of values in each time)
Attached Files
File Type: gz rhoCentralFoamGasCont.tar.gz (4.3 KB, 5 views)
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   June 15, 2015, 08:09
Default how to modify the tool for OF 2.4.0?
  #13
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
Hello dear Bruno, how are you?
I want to update the tool for post processing values for OF 2.4.0 it gives this error at the moment:
Code:
ehsan@ehsan-N56JK:~/OpenFoam/totalpT$ wmake all
Making dependency list for source file totalpT.C
could not open file cyclicAMILduInterface.H for source file totalpT.C due to No such file or directory
could not open file cyclicAMIPolyPatch.H for source file totalpT.C due to No such file or directory
SOURCE=totalpT.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100 -I/opt/openfoam240/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam240/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam240/src/OpenFOAM/lnInclude -I/opt/openfoam240/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/totalpT.o
In file included from /opt/openfoam240/src/finiteVolume/lnInclude/ddtScheme.C:30:0,
                 from /opt/openfoam240/src/finiteVolume/lnInclude/ddtScheme.H:325,
                 from /opt/openfoam240/src/finiteVolume/lnInclude/fvcDdt.C:28,
                 from /opt/openfoam240/src/finiteVolume/lnInclude/fvcDdt.H:199,
                 from /opt/openfoam240/src/finiteVolume/lnInclude/fvc.H:44,
                 from /opt/openfoam240/src/finiteVolume/lnInclude/fvCFD.H:8,
                 from totalpT.C:29:
/opt/openfoam240/src/finiteVolume/lnInclude/cyclicAMIFvPatch.H:39:35: fatal error: cyclicAMILduInterface.H: No such file or directory
 #include "cyclicAMILduInterface.H"
                                   ^
compilation terminated.
make: *** [Make/linux64GccDPOpt/totalpT.o] Error 1
it seems a header doesn't exist anymore or has changed its name. how to resolve it?
thanks a lot.
Attached Files
File Type: gz totalpT.tar.gz (2.1 KB, 1 views)
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   June 15, 2015, 16:00
Default
  #14
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer:
  1. Search for the file:
    Code:
    find $FOAM_SRC -name cyclicAMIPolyPatch.H
  2. Edit "Make/options".
  3. Change this:
    Code:
    EXE_INC = \
        -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
        -I$(LIB_SRC)/finiteVolume/lnInclude
    to this:
    Code:
    EXE_INC = \
        -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
        -I$(LIB_SRC)/meshTools/lnInclude \
        -I$(LIB_SRC)/finiteVolume/lnInclude
immortality likes this.
__________________
wyldckat is offline   Reply With Quote

Reply

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
forced to stick of soot particles kmgraju CFX 9 April 12, 2017 04:38
How tensor parameters to be entered in CFX-pre? hadi.iraji CFX 1 May 7, 2013 05:03
error message cuteapathy CFX 14 March 20, 2012 07:45
Concentric tube heat exchanger (Air-Water) Young CFX 5 October 7, 2008 00:17
about compresive phase James CFX 10 September 12, 2006 04:16


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