CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Forces caused by fluids

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 8, 2006, 07:37
Default This time I compiled: vecto
  #21
Member
 
Anja Stretz
Join Date: Mar 2009
Posts: 92
Rep Power: 17
anja is on a distinguished road
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'
anja is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 22:05.