|
[Sponsors] | |||||
|
|
|
#21 |
|
Member
Anja Stretz
Join Date: Mar 2009
Posts: 92
Rep Power: 18 ![]() |
This time I compiled:
vector Uav = vector::zero; labelfixedPatchID = mesh.boundaryMesh().findPatchID("inlet"); if (fixedPatchID != -1) { forAll(U.boundaryField(), patchI) { if (U.boundaryField()[patchI]) { Uav += average(U.boundaryField()[patchI]); } } mesh.boundaryMesh()[fixedPatchID]; } Info << "Inlet velocity: " << Uav << endl; scalar pav = 0.0; if (fixedPatchID != -1) { forAll(p.boundaryField(), patchI) { if (p.boundaryField()[patchI]) { pav += average(p.boundaryField()[patchI]); } } mesh.boundaryMesh()[fixedPatchID]; } Info << "p : " << pav << endl; To leave out the fixes value, as I only want the results for the inlet. Error: could not convert '(+ U. Foam::GeometricField<type,>::boundaryField [with Type = Foam::vector, PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh]())->Foam::GeometricField<foam::vector,>::GeometricBou ndaryField:: <anonymous>.Foam::FieldField<foam::fvpatchfield,>: :<anonymous>.Foam::PtrList<t>: :operator[] [with T = Foam::fvPatchField<foam::vector>](patchI)' to 'bool' |
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Bug caused by CrankNicholson scheme | cbeck | OpenFOAM Bugs | 8 | March 28, 2009 02:48 |
| waves caused by stones | gamego | Main CFD Forum | 5 | October 1, 2008 11:33 |
| Problems caused by fvcmeshPhi | rolando | OpenFOAM Bugs | 26 | April 3, 2007 11:34 |
| Adiabatic compression caused by gas ram | Chris | FLUENT | 0 | December 13, 2005 05:42 |
| problem caused by the different materials | limingtiger | Siemens | 1 | November 21, 2005 09:02 |