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

mesh.V() does not work inside stochasticDispersion member function

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 17, 2015, 18:46
Default mesh.V() does not work inside stochasticDispersion member function
  #1
New Member
 
Gustavo
Join Date: Feb 2010
Location: Curitiba - PR - Brasil
Posts: 16
Rep Power: 16
ghindi is on a distinguished road
Hi Foamers.

I'm currently trying to modify the stochasticDispersion.C code, that is part of spraySubModel.
Basically I'm modifying the member function disperseParcels().
In the method that I'm changing I need the cell dimension. As I'm using hexahedral elements I just need to read the cell volumes and obtain the cubic root. I'm trying to use mesh.V() to get the cell volumes but when I try to compile the library (wmake libso) I get errors.

The line in the code is
scalar xDim = Foam:: pow(mesh.V()[celli],1/3);

The compilation error message is below:
error: ‘mesh’ was not declared in this scope

If then try the following,
scalar xDim = Foam:: pow(fvMesh::V()[celli],1/3);

The compilation error message is below:
error: cannot call member function ‘const Foam:: DimensionedField<double, Foam::volMesh>& Foam::fvMesh::V() const’ without object

Does anyone knows how to solve that?
Thanks a lot for any assistance.

Regards,
Gustavo.
ghindi is offline   Reply With Quote

Old   May 18, 2015, 03:40
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

There is no mesh in spraySubModels, but there is spray_ [1] member, which has mesh method [2], so your "mesh.V()" should be "spray_.mesh().V()".

1. https://sourceforge.net/p/openfoam-e...ionModel.H#l57
2. https://sourceforge.net/p/openfoam-e...y/spray.H#l246
alexeym is offline   Reply With Quote

Old   May 18, 2015, 20:59
Default
  #3
New Member
 
Gustavo
Join Date: Feb 2010
Location: Curitiba - PR - Brasil
Posts: 16
Rep Power: 16
ghindi is on a distinguished road
Thanks Alexey it worked.
Regards,
Gustavo.
ghindi is offline   Reply With Quote

Reply

Tags
cell volume, libso member function, mesh.v()


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
[Other] refineWallLayer Error Yuby OpenFOAM Meshing & Mesh Conversion 2 November 11, 2021 11:04
[swak4Foam] installation problem with version 0.2.3 Claudio87 OpenFOAM Community Contributions 9 May 8, 2013 10:20
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 01:27
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 02:32
meshing F1 front wing Steve FLUENT 0 April 17, 2003 12:37


All times are GMT -4. The time now is 06:08.