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

Forces caused by fluids

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   May 8, 2006, 06:37
Default This time I compiled: vecto
  #21
Member
 
Anja Stretz
Join Date: Mar 2009
Posts: 92
Rep Power: 7
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

Thread Tools
Display Modes

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 On
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 10:33
Problems caused by fvcmeshPhi rolando OpenFOAM Bugs 26 April 3, 2007 10:34
Adiabatic compression caused by gas ram Chris FLUENT 0 December 13, 2005 04:42
problem caused by the different materials limingtiger CD-adapco 1 November 21, 2005 08:02


All times are GMT -4. The time now is 15:52.