|
[Sponsors] |
March 2, 2012, 07:36 |
new compressibility model
|
#1 |
New Member
Jml
Join Date: Mar 2009
Posts: 23
Rep Power: 17 |
Hi everyone,
I would like to create a new compressibility model (called nuevo_linear) for using with rasCavitatingFoam. I have used the linear model as a template, modifiying the files .C and .H. to define the compressibility as a function of gamma and pressure. In the nuevo_linear.C file I have added the new equation, and the lines " const volScalarField& p " to take into account the pressure in the equation: Foam::compressibilityModels::nuevo_linear::nuevo_l inear ( const dictionary& compressibilityProperties, const volScalarField& gamma, const volScalarField& p ) Furthermore, I have added a line to take into account also the pressure in the nuevo_linear.H file : // Constructors //- construct from components nuevo_linear ( const dictionary& compressibilityProperties, const volScalarField& gamma, const volScalarField& p ); However, when I compile, I obtain the following error: nuevo_linear.C: In constructor âFoam::compressibilityModels::nuevo_linear::nuevo_ linear(const Foam::dictionary&, const Foam::volScalarField&, const Foam::volScalarField&)â: nuevo_linear.C:54: error: no matching function for call to âFoam::barotropicCompressibilityModel::barotropicC ompressibilityModel(const Foam::dictionary&, const Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, const Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&)â /opt/OpenFOAM/OpenFOAM-1.5/src/thermophysicalModels/barotropicCompressibilityModel/lnInclude/barotropicCompressibilityModel.H:119: note: candidates are: Foam::barotropicCompressibilityModel::barotropicCo mpressibilityModel(const Foam::dictionary&, const Foam::volScalarField&) /opt/OpenFOAM/OpenFOAM-1.5/src/thermophysicalModels/barotropicCompressibilityModel/lnInclude/barotropicCompressibilityModel.H:79: note: Foam::barotropicCompressibilityModel::barotropicCo mpressibilityModel(const Foam::barotropicCompressibilityModel&) nuevo_linear.C: In member function âvirtual void Foam::compressibilityModels::nuevo_linear::correct ()â: nuevo_linear.C:66: error: âpâ was not declared in this scope In file included from nuevo_linear.H:39, from nuevo_linear.C:27: /opt/OpenFOAM/OpenFOAM-1.5/src/thermophysicalModels/barotropicCompressibilityModel/lnInclude/barotropicCompressibilityModel.H: In static member function âstatic Foam::autoPtr<Foam::barotropicCompressibilityModel > Foam::barotropicCompressibilityModel::adddictionar yConstructorToTable<barotropicCompressibilityModel Type>::New(const Foam::dictionary&, const Foam::volScalarField&) [with barotropicCompressibilityModelType = Foam::compressibilityModels::nuevo_linear]â: /opt/OpenFOAM/OpenFOAM-1.5/src/thermophysicalModels/barotropicCompressibilityModel/lnInclude/barotropicCompressibilityModel.H:103: instantiated from âFoam::barotropicCompressibilityModel::adddictiona ryConstructorToTable<barotropicCompressibilityMode lType>::adddictionaryConstructorToTable(const Foam::word&) [with barotropicCompressibilityModelType = Foam::compressibilityModels::nuevo_linear]â nuevo_linear.C:38: instantiated from here /opt/OpenFOAM/OpenFOAM-1.5/src/thermophysicalModels/barotropicCompressibilityModel/lnInclude/barotropicCompressibilityModel.H:93: error: no matching function for call to âFoam::compressibilityModels::nuevo_linear::nuevo_ linear(const Foam::dictionary&, const Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&)â nuevo_linear.C:45: note: candidates are: Foam::compressibilityModels::nuevo_linear::nuevo_l inear(const Foam::dictionary&, const Foam::volScalarField&, const Foam::volScalarField&) nuevo_linear.H:56: note: Foam::compressibilityModels::nuevo_linear::nuevo_l inear(const Foam::compressibilityModels::nuevo_linear&) make: *** [Make/linux64GccDPOpt/nuevo_linear.o] Error 1 Could anyone help me to understand what is my mistake?? |
|
March 2, 2012, 10:28 |
|
#2 |
Senior Member
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 18 |
if your familiar wich c++, which is not my case, implementing new stuff should be easier.
in your case you got Code:
nuevo_linear.C:54: error: no matching function for call to âFoam::barotropicCompressibilityModel::barotropicC ompressibilityModel(const Foam::dictionary&, const Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, const Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&)â and go over .H and .C files to see which other files are involved try checking the dependencies, classes and members at http://www.openfoam.org/docs/cpp/ hope it helps sry can't be of more help /calim |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Atomization and Breakup model | xck1986 | OpenFOAM | 4 | May 31, 2014 05:43 |
Problems bout CFD model of biomass gasification, Downdraft gasifier | wanglong | FLUENT | 2 | November 26, 2009 00:27 |
help for different between les model (subgrid-scale model) | liuyuxuan | FLUENT | 1 | October 2, 2009 16:25 |
Grid resolution for full-scale and down scaled model | gravis | Main CFD Forum | 0 | October 2, 2009 11:27 |
Advanced Turbulence Modeling in Fluent, Realizable k-epsilon Model | Jonas Larsson | FLUENT | 5 | March 13, 2000 04:27 |