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

problem in label patchID = mesh.boundaryMesh()[patchi];

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 4 Post By Daniel_Khazaei
  • 1 Post By frobaux

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   September 7, 2019, 09:49
Default problem in label patchID = mesh.boundaryMesh()[patchi];
  #1
Senior Member
 
Hojatollah Gholami
Join Date: Jan 2019
Posts: 171
Rep Power: 7
Hgholami is on a distinguished road
Dear All

I want to assign Ta value to boundaryField via internalField. I defined a Ta in only internalField. Then need to assign the center or surface value of near cells of boundary to its boundaryField, I used code

Quote:
forAll(mesh.boundaryMesh(), patchi)
{
label patchID = mesh.boundaryMesh()[patchi];
forAll(patchID, cellID)
{
if (patchID[cellID] >= LMin+Li*(i-1) //???
&& patchID[cellID] < LMin+Li*i) //???
{
Ta_boundaryField()[cellID] = Ta[i]????;
}
}
}
Before I modify the ???? section, the major problem in compiling is

Quote:
error: cannot convert ‘const Foam::polyPatch’ to ‘Foam::label {aka int}’ in initialization
label patchID = mesh.boundaryMesh()[patchi];
Do you have any suggestion for this error?
regards,
Hojatollah

Last edited by Hgholami; September 7, 2019 at 12:07.
Hgholami is offline   Reply With Quote

 


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
[blockMesh] Internal walls of zero thickness anger OpenFOAM Meshing & Mesh Conversion 23 February 6, 2020 18:25
BuoyantBoussinesqSimpleFoam_Facing problem Mondal131211 OpenFOAM Running, Solving & CFD 1 April 10, 2019 19:41
Gambit - meshing over airfoil wrapping (?) problem JFDC FLUENT 1 July 11, 2011 05:59
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13


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