|
[Sponsors] |
June 20, 2013, 17:55 |
adding compressible option to ptot
|
#1 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
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; } 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. |
|
June 21, 2013, 08:49 |
|
#2 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
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 Code:
p*pow((1.0 + 0.5*psip*gM1ByG**magSqr(Up)), 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. Last edited by immortality; June 21, 2013 at 11:30. |
|
June 21, 2013, 11:30 |
|
#3 |
New Member
Sebastian P.
Join Date: Oct 2011
Location: Germany
Posts: 3
Rep Power: 15 |
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)) ) Regards, Sebastian |
|
June 21, 2013, 12:58 |
|
#4 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
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. |
|
June 21, 2013, 13:09 |
|
#5 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
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
__________________
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. |
|
June 21, 2013, 15:47 |
|
#6 | |
New Member
Sebastian P.
Join Date: Oct 2011
Location: Germany
Posts: 3
Rep Power: 15 |
What do you mean with:
Quote:
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) |
||
June 21, 2013, 16:13 |
|
#7 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
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. |
|
June 21, 2013, 16:26 |
|
#8 |
New Member
Sebastian P.
Join Date: Oct 2011
Location: Germany
Posts: 3
Rep Power: 15 |
Uff... I get this error too but it works fine with tar xf
EDIT: Now it should work... |
|
June 21, 2013, 16:50 |
|
#9 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
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())) ) 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. |
|
June 22, 2013, 12:56 |
|
#10 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
I wrote the required equation for total_pressure :
Code:
p0=p*pow(1+magSqr(U)/(2*Cp*T),Cp/(Cp-Cv)) 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. |
|
June 23, 2013, 05:15 |
|
#11 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
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
__________________
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. |
|
June 23, 2013, 06:07 |
|
#12 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
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)
__________________
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. |
|
June 15, 2015, 08:09 |
how to modify the tool for OF 2.4.0?
|
#13 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
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 thanks a lot.
__________________
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. |
|
June 15, 2015, 16:00 |
|
#14 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quick answer:
__________________
|
|
|
|
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 |