CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   adding compressible option to ptot (http://www.cfd-online.com/Forums/openfoam-programming-development/119640-adding-compressible-option-ptot.html)

immortality June 20, 2013 16:55

adding compressible option to ptot
 
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
                )
            );
        }


immortality June 21, 2013 07:49

1 Attachment(s)
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?

S.P. June 21, 2013 10:30

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 June 21, 2013 11:58

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.

immortality June 21, 2013 12:09

1 Attachment(s)
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.

S.P. June 21, 2013 14:47

1 Attachment(s)
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)

immortality June 21, 2013 15:13

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


S.P. June 21, 2013 15:26

Uff... I get this error too but it works fine with tar xf

EDIT: Now it should work...

immortality June 21, 2013 15:50

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.

immortality June 22, 2013 11:56

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.

immortality June 23, 2013 04:15

1 Attachment(s)
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


immortality June 23, 2013 05:07

1 Attachment(s)
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)

immortality June 15, 2015 07:09

how to modify the tool for OF 2.4.0?
 
1 Attachment(s)
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?:confused:
thanks a lot.

wyldckat June 15, 2015 15:00

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



All times are GMT -4. The time now is 09:48.