CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Problem with source term in the calculation domain

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 28, 2005, 10:43
Default 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<fvscalarmatrix> 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
  Reply With Quote

Reply

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
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


All times are GMT -4. The time now is 12:16.