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

OpenFoam Library compilation error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 9, 2023, 11:41
Default OpenFoam Library compilation error
  #1
New Member
 
Jaymeen Patel
Join Date: Jan 2023
Location: Chennai
Posts: 7
Rep Power: 3
jaymeen721 is on a distinguished road
Hello I am new to openFoam and using OF V 9, and I am customizing phaseChangeModel library to add specific Heat C and thermal conductivity.


I am added them under library incompressibleTwoPhaseMixture, code snippet is added in image, while compiling, I am getting an error: ‘const class Foam::immiscibleIncompressibleTwoPhaseMixture’ has no member named ‘C1’,

for incompressibleTwoPhaseMixture.H,



const dimensionedScalar& C1() const
{
return C1_;
}

//- Return const-access to phase2 Specific Heat
const dimensionedScalar& C2() const
{
return C2_;
};

//- Return const-access to phase1 thermal condcutivity
const dimensionedScalar& K1() const
{
return K1_;
}

//- Return const-access to phase2 thermal conductivity
const dimensionedScalar& K2() const
{
return K2_;
};



2nd for incompressibleTwoPhaseMixture.C



rho1_("rho", dimDensity, nuModel1_->viscosityProperties()),
rho2_("rho", dimDensity, nuModel2_->viscosityProperties()),
C1_(nuModel1_->viscosityProperties().lookup("C")),
C2_(nuModel2_->viscosityProperties().lookup("C")),
K1_(nuModel1_->viscosityProperties().lookup("K")),
K2_(nuModel2_->viscosityProperties().lookup("K")),



Error:
‘const class Foam::immiscibleIncompressibleTwoPhaseMixture’ has no member named ‘C1’
241 | volScalarField rhoCp = mixture_.rho1()*mixture_.C1()*mixture_.alpha1() + mixture_.rho2()*mixture_.C2()*(1.0-mixture_.alpha1());
| ^~
phaseChange/phaseChangeModel/phaseChangeModel.C:241:102: error: ‘const class Foam::immiscibleIncompressibleTwoPhaseMixture’ has no member named ‘C2’
241 | Cp = mixture_.rho1()*mixture_.C1()*mixture_.alpha1() + mixture_.rho2()*mixture_.C2()*(1.0-mixture_.alpha1());
| ^~

make: *** [/opt/openfoam9/wmake/rules/General/transform:26: Make/linux64GccDPInt32Opt/phaseChange/phaseChangeModel/phaseChangeModel.o] Error 1



I am unable to figure out, where i am doing mistake, plz help.


Thanks in advance
jaymeen721 is offline   Reply With Quote

Reply

Tags
custom library, openfoam 9


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
OpenFOAM v3.0+ ?? SBusch OpenFOAM 22 December 26, 2016 15:24
Undeclared Identifier Errof UDF SteveGoat Fluent UDF and Scheme Programming 7 October 15, 2014 08:11
How to install CGNS under windows xp? lzgwhy Main CFD Forum 1 January 11, 2011 19:44
ParaView for OF-1.6-ext Chrisi1984 OpenFOAM Installation 0 December 31, 2010 07:42
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 11:23


All times are GMT -4. The time now is 16:27.