|November 14, 2013, 11:26||
Center of Mass / volume
Join Date: Jul 2010
Posts: 156Rep Power: 8
I'm trying to add the calculation of the center of mass in the solver InterFoam. I wrote in interFoam.C :
vector CoM = sum(mesh.V()*(alpha1*rho1 + (1-alpha1)*rho2)*mesh.C().internalField())/sum(mesh.V()*(alpha1*rho1+(1-alpha1)*rho2));
vector CoV = sum(mesh.V()*mesh.C().internalField())/sum(mesh.V());
I can't see the probleme. If the first line compile, the second should too. Does anyone of you have any idea ?
After some tests it seems the problem is coming from "mesh.C().internalField()". As soon as I use this in the "sum" operator, the dimensions are deleted.
- sum(rho*mesh.V()) -> dimension is kg.
- sum(rho*mesh.V()*mesh.C().internalField() -> dimmensionless.
Is there a way to fix that ?
|November 14, 2013, 14:50||
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 435Rep Power: 14
Follow me on twitter @DavidGaden
|Thread||Thread Starter||Forum||Replies||Last Post|
|Water subcooled boiling||Attesz||CFX||7||January 5, 2013 04:32|
|Closed Volume: Mass increases, pressure and temperature decrease...||vainilreb||OpenFOAM Running, Solving & CFD||1||December 4, 2012 08:57|
|error message with modeling a cube with a hold at the center||hsingtzu||OpenFOAM Native Meshers: blockMesh||2||March 14, 2012 10:56|
|mass flow in is not equal to mass flow out||saii||CFX||2||September 18, 2009 08:07|
|volume fraction, Mass fraction and Bulk Mass flow||Dr.jones||CFX||1||January 25, 2006 05:32|