|November 28, 2005, 10:43||
Hello everybody I want to p
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:
const vectorField& centres = ;
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);
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.
|Thread||Thread Starter||Forum||Replies||Last Post|
|Momentum source term problem||kdarc||OpenFOAM Running, Solving & CFD||3||February 11, 2009 08:52|
|source term in a gas mixture problem||Kevin||CD-adapco||0||March 27, 2008 06:55|
|linearization problem of source term||wanghong||FLUENT||1||March 2, 2006 08:23|
|problem with pump as source term||hari||FLUENT||1||September 19, 2005 11:38|
|Problem: buoyancy source term for KE-EP model||Andrey V.Ivanov||Phoenics||0||May 23, 2003 03:50|