evaluate surface of the patchField
hello!
I am facing a new problem : I do not know how to evaluate the surface of a patchField labeled patchID. I was thinking about Code:
p.boundaryField[patchID].magSf(); Thank you very much for your help, Cyp |
Hi Cyp,
try: Code:
p.boundaryField()[patchID].magSf(); |
Hi Martin!
It doesn't work neither... (in fact it was what I tried... my first post was a typo) |
May be
Code:
mesh.magSf().boundaryField()[patchID]; Can you post some more code? Martin |
It still doesn't work...
This is the piece of code I consider: Code:
surfaceScalarField phiKsa = fvc::interpolate(kSa); |
Code:
phiP.boundaryField() = ((-fvc::interpolate(Ub+Ua)&mesh.Sf())+((rhoa*phiKsa+rhob*phiKsb)*g&mesh.Sf()))/(phiKsa + phiKsb)/mesh.magSf().boundaryField(); What's the error message? Is it one of the standard solvers of OpenFOAM, so I can check it? May be you can loop over the patches like here: Code:
volVectorField tau |
thank you very much for your help. It works now!
Code:
scalarField fluxP = -(phi.boundaryField()[patchID]) |
All times are GMT -4. The time now is 04:35. |