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

How access member variable of a boundary condition

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 11, 2014, 08:38
Default How access member variable of a boundary condition
  #1
New Member
 
Join Date: Dec 2012
Posts: 12
Rep Power: 5
Vesposo is on a distinguished road
Hi,

i want to access in my own boundary condition a member variable of another boundary condition.

For example:

There is a boundary "anotherFvPatchScalarField" condition with the variable

word info = "anInfo";


in my own boundary condition I want to access the variable info:

word patchName = "patchWithVariableInfo";
label patchID = this->patch().boundaryMesh().findPatchID(patchName)

const fvPatch& anotherPatch = this->patch().boundaryMesh()[patchId_];


Info << reCast<anotherFvPatchScalarField>(anotherPatch).in fo;


But, there is a cast error in the last line.

Attempt to cast type wall to type anotherFvPatchScalarField.

Any hints?
Thanks

Last edited by Vesposo; March 11, 2014 at 14:55.
Vesposo is offline   Reply With Quote

Old   March 13, 2014, 08:49
Default
  #2
New Member
 
Join Date: Dec 2012
Posts: 12
Rep Power: 5
Vesposo is on a distinguished road
The problem is that

this->patch().boundaryMesh()[patchId_]

returns a fvPatch and not a specific fvPatchField like anotherFvPatchScalarField.

Is there a possibility in my boundary condition to access fvPatchFields from a specific fvPatch?
Vesposo 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
Variable names for mass flux for a recirculating-outlet boundary condition BRNN Fluent UDF and Scheme Programming 5 November 15, 2015 10:31
Dirichlet boundary condition for additional variable on the wall ftab CFX 13 January 27, 2013 13:24
Slip boundary condition what is inside normunds OpenFOAM Running, Solving & CFD 2 June 4, 2007 06:45
Additional variable - wall boundary condition flga CFX 2 May 30, 2007 03:14
Variable Boundary Condition Houman CFX 0 September 5, 2006 05:03


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