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

const qualifier problems

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 17, 2016, 08:56
Default const qualifier problems
  #1
Member
 
Zhiheng Wang
Join Date: Mar 2016
Posts: 72
Rep Power: 10
Zhiheng Wang is on a distinguished road
Hi my createField.H has defination of T as

const volScalarField& T = thermo.T();
I want to impliment my code on boundaryCondition correction as

forAll(T.boundaryField()[patchID],i)
{

T.boundaryField)([patchID][i] = T.boundaryField()[patchID][i]-DT;
------------
-------------------------- (some code for spoces) ........
T.write();

}

I am getting following error

error: assignment of read-only location ‘(&(&(& T)->Foam::GeometricField<Type, PatchField, GeoMesh>::boundaryField<double,.....

How to resolve this condition I want to correct the temperature T with some differet function based on spices flux. please help
Zhiheng Wang 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
Viscoelastic Fluid Flows using OpenFOAM The solver viscoelasticFluidFoam jovani OpenFOAM Running, Solving & CFD 475 January 13, 2023 08:21
[snappyHexMesh] Error snappyhexmesh - Multiple outside loops avinashjagdale OpenFOAM Meshing & Mesh Conversion 53 March 8, 2019 09:42
k-e & GAMG interFoam Schemitisation Stability Issue JFM OpenFOAM Running, Solving & CFD 3 December 1, 2015 05:58
RunTim Error for simpleFoam Djub OpenFOAM Running, Solving & CFD 2 April 12, 2013 11:51
problem in defining the temperature dependent viscosity!!! adambarfi OpenFOAM Programming & Development 0 March 5, 2013 06:25


All times are GMT -4. The time now is 06:02.