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

new compressibility model

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

Reply
 
LinkBack Thread Tools 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: 8
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: 136
Rep Power: 8
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

Thread Tools
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 On
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 04: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 15:25
Grid resolution for full-scale and down scaled model gravis Main CFD Forum 0 October 2, 2009 10: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 13:16.