# Problem with source term in the calculation domain

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 LinkBack Thread Tools Display Modes
 November 28, 2005, 10:43 Hello everybody I want to p #1 galaad Guest   Posts: n/a Hello everybody I want to put a source term in the calculation domain of a variable V at x=0,25mm and for variation of 3mm on the y axis. I have written the equation resolution of this scalar as this: tmp VEqn ( fvm::laplacian(sigma, V) ); const vectorField& centres = ; forAll(centres, cellI) { if ((centres[cellI].x() == 0.250e-03) && (centres[cellI].y() <= 3.000e-03)) { solve(VEqn() == 1.200e08*exp(-2.080e03*centres[cellI].y())/0.250e-03); } else { VEqn().solve(); } } Veqn().relax(); But I have two questions: 1) is the geometric position of a cell is represented by (mesh.C()[cellI].x(), mesh.C()[cellI].y(), mesh.C()[cellI].z())? 2) I have an error concerning the exponential expression during compiling. This error is: VEqn.H:14: error: call of overloaded 'exp(const double&)' is ambiguous /usr/include/bits/mathcalls.h:101: note: candidates are: double exp(double) /home/fvm/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lnInclude/dimensionedScalar.H:70: note: Foam::dimensionedScalar Foam::exp(const Foam::dimensionedScalar&) I thought the problem was with centres[cellI].y() declaration... but when I only use exp(-2.080e03) the error also occurs. So I think I have not well written the exponential expression in my program... I think it's a stupid question but it seems like I've forgotten something!!! Thank you for your comments or your help. Fred

 Thread Tools Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post kdarc OpenFOAM Running, Solving & CFD 3 February 11, 2009 08:52 Kevin CD-adapco 0 March 27, 2008 06:55 wanghong FLUENT 1 March 2, 2006 08:23 hari FLUENT 1 September 19, 2005 11:38 Andrey V.Ivanov Phoenics 0 May 23, 2003 03:50

All times are GMT -4. The time now is 20:25.

 Contact Us - CFD Online - Top