|
[Sponsors] |
March 19, 2007, 01:35 |
Hi, all:
I searched the for
|
#1 |
Member
roy fokker
Join Date: Mar 2009
Posts: 44
Rep Power: 17 |
Hi, all:
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: mesh.cells()[cellLabel].V()... Thanks a lot! |
|
March 19, 2007, 06:57 |
mesh.V()
|
#2 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 |
mesh.V()[cellID]
|
|
August 1, 2010, 04:09 |
|
#3 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25 |
hi friend
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; or const scalarField& cellVolumes() const; Last edited by nimasam; August 1, 2010 at 04:28. |
|
June 9, 2011, 08:15 |
|
#4 |
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 16 |
nimasam, did you found a solution?
I have the same problem now... thanks, rupert |
|
June 9, 2011, 11:11 |
|
#6 |
Member
fisch
Join Date: Feb 2010
Posts: 97
Rep Power: 16 |
thanks for the quick reply, l_r_mcglashan
i used it without thinking because it's written like this in the programmersGuide P33. |
|
August 8, 2015, 09:02 |
measuring volume
|
#7 |
Member
Join Date: Jul 2015
Posts: 33
Rep Power: 11 |
hi guys,
how can I measure the volume of geometry in openFoan? |
|
August 9, 2015, 21:20 |
|
#8 |
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18 |
||
February 12, 2016, 13:22 |
|
#9 |
Member
Join Date: Jul 2014
Posts: 39
Rep Power: 12 |
Is it possible to get the volumes only of the cells at patchID?
If I have: Code:
label patchID = mesh.boundaryMesh().findPatchID(patchName); Otherwise to get the Code:
cellI 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, 06:02 |
|
#10 |
Member
Lennart
Join Date: Feb 2016
Posts: 46
Rep Power: 10 |
I also have a question regarding the use of mesh.V():
Code:
//works Info<< "Total liquid volume liquidV = " << sum(mesh.V()*alpha1).value() << endl; // doesn't work volScalarField interfDens(aInterfaceCells/mesh.V()); |
|
August 14, 2017, 01:54 |
|
#11 |
Member
Jack
Join Date: Aug 2012
Posts: 47
Rep Power: 14 |
I assume that people want to do it for postprocessing. This is how I did it (by copying LESDelta and cubeRootVolDelta implementation):
Code:
# include "calculatedFvPatchFields.H" volScalarField V ( IOobject ( "V", runTime.timeName(), mesh, IOobject::NO_READ ), mesh, dimensionedScalar("small", dimLength*dimLength*dimLength, SMALL), calculatedFvPatchScalarField::typeName ); V.internalField() = mesh.V(); V.write(); |
|
September 25, 2017, 12:39 |
|
#12 | |
Member
Linyan X
Join Date: Dec 2015
Posts: 43
Rep Power: 11 |
Hi Lennart,
I meet the exactly the same question as you mentioned. I was trying to calculate the weight for every cell and store the value into the volScalarField. Quote:
All the best, Linyan |
||
February 3, 2022, 08:18 |
|
#13 |
Member
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 5 |
Hi jack,
I know this post is old but Can u tell me how to use it in twoPhaseMixtureThermo.C in compressibleInterfoam solver. Because when I am using it as const volScalarField& cellVolume = mesh.V(); I am getting an error that mesh was not declared in this scope. |
|
July 21, 2022, 16:46 |
|
#14 |
New Member
Join Date: Jun 2022
Posts: 10
Rep Power: 4 |
I feel that my question is somehow relevant to this thread. Hence, I am posting it here.
I know that magSf() function can calculate individual face area. However, I want to know the surface area of a cell just like we can get cell volume by using mesh.V(). Does anyone know how to get the cell surface area? Thanks in advance ! |
|
July 22, 2022, 00:32 |
|
#15 |
Member
hari charan
Join Date: Sep 2021
Location: India,hyderabad
Posts: 97
Rep Power: 5 |
Hi abhishek,
Though I didn’t try this. Try using fvc::surfaceSum(mesh.sf()) |
|
July 22, 2022, 01:47 |
|
#16 |
New Member
Join Date: Jun 2022
Posts: 10
Rep Power: 4 |
Hello Hari Charan,
Thanks, I will try it and let you know if it works ! |
|
September 28, 2023, 17:13 |
|
#17 | |
New Member
Eduardo Paiva
Join Date: Jul 2020
Posts: 5
Rep Power: 6 |
Someone knows how to do that? I need to get a volume of a cell patch
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to fix a volume cell? | jpsegura | FLUENT | 0 | May 31, 2007 19: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 9, 2003 00:58 |
Cell volume | Takeshi | Siemens | 2 | July 16, 2003 23:02 |
How to caculate cell volume | Tareq Al-shaalan | Main CFD Forum | 2 | November 4, 2002 09:48 |