|
[Sponsors] |
mesh.V() does not work inside stochasticDispersion member function |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 17, 2015, 19:46 |
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 |
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. |
|
May 18, 2015, 04:40 |
|
#2 |
Senior Member
|
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 |
|
May 18, 2015, 21:59 |
|
#3 |
New Member
Gustavo
Join Date: Feb 2010
Location: Curitiba - PR - Brasil
Posts: 16
Rep Power: 16 |
Thanks Alexey it worked.
Regards, Gustavo. |
|
Tags |
cell volume, libso member function, mesh.v() |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] refineWallLayer Error | Yuby | OpenFOAM Meshing & Mesh Conversion | 2 | November 11, 2021 12:04 |
[swak4Foam] installation problem with version 0.2.3 | Claudio87 | OpenFOAM Community Contributions | 9 | May 8, 2013 11:20 |
is internalField(U) equivalent to zeroGradient? | immortality | OpenFOAM Running, Solving & CFD | 7 | March 29, 2013 02:27 |
Installation OF1.5-dev | ttdtud | OpenFOAM Installation | 46 | May 5, 2009 03:32 |
meshing F1 front wing | Steve | FLUENT | 0 | April 17, 2003 13:37 |