CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Running, Solving & CFD

Making Diracbs delta function

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   November 30, 2008, 07:52
Default createMpSource.H:17: error: no
Senior Member
Henrik Rusche
Join Date: Mar 2009
Location: Braunschweig, Niedersachsen, Germany
Posts: 277
Rep Power: 11
henrik is on a distinguished road
createMpSource.H:17: error: no matching function for call to 'Foam::fvMesh::findCell(Foam::dimensionedVector&)'
/home/sea/OpenFOAM/OpenFOAM-1.5/src/OpenFOAM/lnInclude/primitiveMesh.H:662: note: candidates are: Foam::label Foam::primitiveMesh::findCell(const Foam::point&) const

The compiler trys to tell you that your variable sp of type dimensionedVector cannot automatically converted into a point. Try sp.value(). (Vectors can be converted into points)

henrik is offline   Reply With Quote

Old   December 1, 2008, 06:14
Default Dear Henrik, Thank you very
New Member
Seiji Adachi
Join Date: Mar 2009
Location: Stuttgart, Germany
Posts: 5
Rep Power: 10
seiji_adachi is on a distinguished road
Dear Henrik,

Thank you very much for your reply.

Now I understand the difference between point(=vector) and dimensionedVector. The latter has a name and dimensions in addition to its value. This is why value() is needed to extract the value here. I made the same mistake at line 19. The code was rewrote as follows and it worked!

// Add value of 1/v to deltaFunc at the point of sp!!!
label celli(mesh.findCell(sp.value()));
dimensionedScalar vol = mesh.V()[celli];
deltaFunc[celli] = 1.0/vol.value();


seiji_adachi is offline   Reply With Quote


Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scalar Dissipation - delta function assumption Tristan Collins FLUENT 0 December 13, 2007 08:15
How to calculte \Delta t from CFL? Annie Main CFD Forum 4 March 23, 2005 10:48
LES delta turb Main CFD Forum 2 March 2, 2005 15:27
Making the density a function additional variab. Sebastien Perron CFX 4 August 8, 2003 08:03
Delta wing Thomas Pettersson FLUENT 1 April 22, 2000 20:18

All times are GMT -4. The time now is 13:01.