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

new compressibility model

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 2, 2012, 07:36
Default new compressibility model
  #1
jml
New Member
 
Jml
Join Date: Mar 2009
Posts: 23
Rep Power: 17
jml is on a distinguished road
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??
jml is offline   Reply With Quote

Old   March 2, 2012, 10:28
Default
  #2
Senior Member
 
calim_cfd's Avatar
 
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 18
calim_cfd is on a distinguished road
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>&)â
this is the first error you gotta debug. at line 54.

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
calim_cfd is offline   Reply With Quote

Reply


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
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


All times are GMT -4. The time now is 17:24.