|March 19, 2007, 01:35||
Hi, all: I searched the for
Join Date: Mar 2009
Posts: 44Rep Power: 9
I searched the forum and doxygen, found a function mag and the following comments:
// INSTRUCTION FOR USE!
// When one wants to access the cell centre and magnitude, the
// functionality on the mesh level should be used in preference to the
// functions provided here. They do not rely to the functionality
// implemented here, provide additional checking and are more efficient.
// The cell::centre and cell::mag functions may be removed in the future.
// WARNING! See cell::centre
// first calculate the aproximate cell centre as the average of all
// face centres
I am just confused how to use it and what is the best way to find the cell volume? What I am trying to do is something like:
Thanks a lot!
|August 1, 2010, 03:09||
Join Date: Sep 2009
Location: Tehran, Iran
Blog Entries: 1Rep Power: 17
i want to access volume of cells in volScalarField but in openFoam there is two ways to access to the mesh volume and none of them are volScalarField:
const DimensionedField<scalar, volMesh>& V() const;
const scalarField& cellVolumes() const;
Last edited by nimasam; August 1, 2010 at 03:28.
|June 9, 2011, 10:11||
Join Date: Feb 2010
Posts: 97Rep Power: 8
thanks for the quick reply, l_r_mcglashan
i used it without thinking because it's written like this in the programmersGuide P33.
|August 9, 2015, 20:20||
Join Date: Jul 2009
Location: Amherst, MA USA - San Diego, CA USA
Posts: 320Rep Power: 10
|February 12, 2016, 13:22||
Join Date: Jul 2014
Posts: 37Rep Power: 4
Is it possible to get the volumes only of the cells at patchID?
If I have:
label patchID = mesh.boundaryMesh().findPatchID(patchName);
Otherwise to get the
Then I can use that which Kyle recommended. I would like to multiply the value on a patch face with the volume of the cell corresponding to the patch face. The will give me something like a indication of adding mass to cell.
Last edited by PicklER; February 12, 2016 at 13:25. Reason: Clarity
|April 19, 2016, 05:02||
Join Date: Feb 2016
Posts: 21Rep Power: 2
I also have a question regarding the use of mesh.V():
//works Info<< "Total liquid volume liquidV = " << sum(mesh.V()*alpha1).value() << endl; // doesn't work volScalarField interfDens(aInterfaceCells/mesh.V());
|Thread||Thread Starter||Forum||Replies||Last Post|
|How to fix a volume cell?||jpsegura||FLUENT||0||May 31, 2007 18:42|
|negative cell volume||alfin||FLUENT||2||January 19, 2006 21:17|
|Cell-vertex and cell-centered finite volume method||Praveen||Main CFD Forum||4||September 8, 2003 23:58|
|Cell volume||Takeshi||CD-adapco||2||July 16, 2003 22:02|
|How to caculate cell volume||Tareq Al-shaalan||Main CFD Forum||2||November 4, 2002 09:48|