|
[Sponsors] |
How to access to an fvpatchfiel object on a patch from other object on the same patch |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 11, 2018, 15:43 |
How to access to an fvpatchfiel object on a patch from other object on the same patch
|
#1 |
New Member
SSSSS
Join Date: Jun 2011
Posts: 29
Rep Power: 15 |
Hi,
I am trying to make a boundary condition class. For velocity, I have a class derived from fixedValueFvPatchVectorField class which has a public member function as follows: class customUBoundary : public fixedValueFvPatchVectorField { ... public: const fvScalar& Ustar(); } another boundary condition, say customKBoundary which want to access to the public member function of customUBoundary. I could find out a way to get the velocity field from the customKBoundary on the same boundary patch as follows: const volVectorField& U = db().lookupObject<volVectorField>("U); const fvMesh& mesh = U.mesh(); label patchId = mesh.boundaryMesh().findPatchID(this->patch().name()); const vectorField& velocityField = U.boundaryField()[patchId]; is there a way to get customUBoundary object so that customKBoundary class can call directly customUBoundary.Ustar() member function like const customUBoundary& temp = dynamic_cast<customUBoundary>(U.boundaryField()[patchId]) Thanks in advance. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with cyclic boundaries in Openfoam 1.5 | fs82 | OpenFOAM | 36 | January 7, 2015 01:31 |
chtMultiRegionFoam Tutorial | m.nichols19 | OpenFOAM | 12 | September 9, 2010 12:56 |
[Other] StarToFoam error | Kart | OpenFOAM Meshing & Mesh Conversion | 1 | February 4, 2010 05:38 |
CheckMeshbs errors | ivanyao | OpenFOAM Running, Solving & CFD | 2 | March 11, 2009 03:34 |
[blockMesh] BlockMeshmergePatchPairs | hjasak | OpenFOAM Meshing & Mesh Conversion | 11 | August 15, 2008 08:36 |