# How to determine a boundary type in the code?

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

 June 12, 2013, 23:27 How to determine a boundary type in the code? #1 Member   Charlie Join Date: Dec 2010 Location: 415 Kinross Dr. Newark, DE 19711 Posts: 80 Rep Power: 8 Hi Foamers, I have a general question about how to determine a boundary type in the code, for example, in twoPhseEulerFoam (OF2.1.0), the pEqn.H has the following code to determine whether the boundary patch is zeroGradient or not: forAll(p.boundaryField(),patchi) { if (isA(p.boundaryFie ld()[patchi])) { phiDraga.boundaryField()[patchi] = 0.0; phiDraga.boundaryField()[patchi] = 0.0; } } So, my question is, what if I want to determine whether the boundary field of p is symmetryPlane or not? I tried the following, and it turns out that it does not work, any hint?? forAll(p.boundaryField(),patchi) { if (isA(p.boundaryFi eld()[patchi])) { phiDraga.boundaryField()[patchi] = 0.0; phiDraga.boundaryField()[patchi] = 0.0; } } Thanks!!!

 June 12, 2013, 23:39 Further Info #2 Member   Charlie Join Date: Dec 2010 Location: 415 Kinross Dr. Newark, DE 19711 Posts: 80 Rep Power: 8 forAll(p.boundaryField(),patchi) { if (isA(p.boundaryField()[patchi])) { phiDraga.boundaryField()[patchi] = 0.0; phiDragb.boundaryField()[patchi] = 0.0; } } and get the following error message when I tried to compile the code: error: 'symmetryFvPatchScalarField' was not declared in this scope error: no matching function for call to 'isA(Foam::fvPatchField&)' any help?? Thanks! Charlie

 June 13, 2013, 12:20 #3 Senior Member     Marco A. Turcios Join Date: Mar 2009 Location: Vancouver, BC, Canada Posts: 728 Rep Power: 20 In the basic folder of fvPatchFields in \$FOAM_SRC, there is a folder for the basic type basicSymmetry. I think the type you want to test for is basicSymmetryFvPatchScalarField (you'll probably have to do a much more thorough check than I did).

 June 13, 2013, 12:36 Thanks! #4 Member   Charlie Join Date: Dec 2010 Location: 415 Kinross Dr. Newark, DE 19711 Posts: 80 Rep Power: 8 Thanks, Marco, Thank you for you suggestions, the problem is now solved, I need to include "symmetryFvPatchFields.H" in my main files, that's why the error message said, error: 'symmetryFvPatchScalarField' was not declared in this scope. Thanks! Charlie

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post martyn88 OpenFOAM 22 April 17, 2015 06:00 simpomann OpenFOAM Running, Solving & CFD 3 February 17, 2014 18:06 Shafiul CFX 10 February 17, 2011 08:57 Fabian OpenFOAM 2 December 12, 2009 05:53 Young CFX 5 October 6, 2008 23:17

All times are GMT -4. The time now is 12:07.