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

customized densityBasedTurbo compilation error in FE4.0

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 15, 2020, 22:17
Default customized densityBasedTurbo compilation error in FE4.0
  #1
Member
 
Bidesh Sengupta
Join Date: Sep 2018
Location: Sngapore
Posts: 76
Rep Power: 8
BSengupta is on a distinguished road
Hi Foamers,


I am trying to write some code by modifying densityBasedTurbo in foam extend 4. I am getting the following error:

************************************************** ************************************************** *************************
BSTurboFoam.C:127:25: error: passing ‘const surfaceVectorField {aka const Foam::GeometricField<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh>}’ as ‘this’ argument discards qualifiers [-fpermissive]
dbnsFlux.dotX() = mrfZones.faceU();

************************************************** ************************************************** ************************
In BSTurboFoam.C : dbnsFlux.dotX() = mrfZones.faceU();

************************************************** ************************************************** ************************
In numericFlux.C:

template<class Flux, class Limiter>
Foam::numericFlux<Flux, Limiter>::numericFlux
(
const volScalarField& p,
const volVectorField& U,
const volScalarField& T,
basicThermo& thermo
)
:
numericFluxBase<Flux>(p.mesh()),
p_(p),
U_(U),
T_(T),
thermo_(thermo),
rhoFlux_
(
....
),
rhoUFlux_
(
...
),
rhoEFlux_
(
...
),
dotX_
(
IOobject
(
"dotX",
this->mesh().time().timeName(),
this->mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE
),
this->mesh(),
dimensionedVector("zero", dimVelocity, vector::zero)
)

{}

************************************************** ************************************************** *************************

In MRFZone.C :
void Foam::MRFZone::faceU
(
surfaceVectorField& zoneFaceU
) const
{
...
}

************************************************** ************************************************** *************************
In MRFZones.C :
Foam::tmp<Foam::surfaceVectorField> Foam::MRFZones::faceU() const
{
tmp<surfaceVectorField> tMRFZonesFaceU
(
new surfaceVectorField
(
...
)
);
surfaceVectorField& MRFZonesFaceU = tMRFZonesFaceU();

forAll(*this, i)
{
operator[](i).faceU(MRFZonesFaceU);
}

return tMRFZonesFaceU;
}


I shall be greatly helped if the error gets resolved and can proceed further. Thanks a lot for your time.


Bidesh
BSengupta is offline   Reply With Quote

Old   January 20, 2020, 20:42
Default
  #2
Member
 
Bidesh Sengupta
Join Date: Sep 2018
Location: Sngapore
Posts: 76
Rep Power: 8
BSengupta is on a distinguished road
Any help please...
BSengupta is offline   Reply With Quote

Reply

Tags
coding style, compilation error, dbnsturbfoam, density based solver, foam ext 4.0


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
Compilation Error (V 1.7.1; Icc 12.1.0, OpenMPI 1.4.3) floydfan OpenFOAM Installation 7 December 20, 2011 06:56


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