|
[Sponsors] |
How to determine a boundary type in the code? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 13, 2013, 00:27 |
How to determine a boundary type in the code?
|
#1 |
Member
Charlie
Join Date: Dec 2010
Location: USA
Posts: 85
Rep Power: 16 |
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<zeroGradientFvPatchScalarField>(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<symmetryPlaneFvPatchScalarField>(p.boundaryFi eld()[patchi])) { phiDraga.boundaryField()[patchi] = 0.0; phiDraga.boundaryField()[patchi] = 0.0; } } Thanks!!! |
|
June 13, 2013, 00:39 |
Further Info
|
#2 |
Member
Charlie
Join Date: Dec 2010
Location: USA
Posts: 85
Rep Power: 16 |
forAll(p.boundaryField(),patchi)
{ if (isA<symmetryFvPatchScalarField>(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<double>&)' any help?? Thanks! Charlie |
|
June 13, 2013, 13:20 |
|
#3 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
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, 13:36 |
Thanks!
|
#4 |
Member
Charlie
Join Date: Dec 2010
Location: USA
Posts: 85
Rep Power: 16 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
LES supersonic free jet | martyn88 | OpenFOAM | 22 | April 17, 2015 07:00 |
interFoam/kOmegaSST tank filling with printStackError/Mules | simpomann | OpenFOAM Running, Solving & CFD | 3 | February 17, 2014 18:06 |
CFX does not continue | Shafiul | CFX | 10 | February 17, 2011 08:57 |
pipe flow with heat transfer | Fabian | OpenFOAM | 2 | December 12, 2009 05:53 |
Concentric tube heat exchanger (Air-Water) | Young | CFX | 5 | October 7, 2008 00:17 |