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

A question corcerning source terms

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 6, 2005, 03:38
Default Hello everybody, I have a q
  #1
galaad
Guest
 
Posts: n/a
Hello everybody,

I have a question concerning source terms. First, I will explain you that I want to solve an equation with a source term in the calculation domain. I write the code like that:

double ttemp;

forAll(mesh.C(), i)
{
ttemp = pow(mesh.C()[i].y(),2)+pow(mesh.C()[i].z(),2);
if (mesh.C()[i].x() >= 2.384e-03 && mesh.C()[i].x() <= 2.634e-03 && Foam::pow(ttemp, 0.5) <= 3.000e-03)
{
Jmax[i] = 1.2e08;
Rayon[i] = Foam::pow(pow(mesh.C()[i].y(),2)+pow(mesh.C()[i].z(),2),0.5);
DeltaZ[i] = 0.25e-03;
}
else
{
Jmax[i] = 0.0;
Rayon[i] = 0.0;
DeltaZ[i] = 1.0;
}
}

/* Veqn solving */
tmp<fvscalarmatrix> VEqn
(
fvm::laplacian(sigma, V)
==
Jmax*exp(-2.080e03*Rayon)/DeltaZ
);

Veqn().solve();

Jmax, DeltaZ and Rayon are declared as volScalarField. The first calculations show great differences between the solution given by OpenFOAM and the solution given by our code. So my question is: in OpenFOAM, do we have to weight the source term by a jacobian or the cell volume like is done in some CFD code? I don't think so by viewing the programming the source term of several solvers in OpenFOAM. But I does not explain the differences I found...

I'm waiting for your explanations and your help. Thank you.

Frédéric LAGO
  Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Source Terms Sas Main CFD Forum 5 November 24, 2006 03:40
Source terms... again AdN FLUENT 9 April 27, 2006 04:34
Source Terms Rajan CFX 1 March 14, 2005 09:26
Help.. Source terms.. Diana FLUENT 1 July 4, 2002 00:06
UDF for source terms Tom FLUENT 1 April 26, 2002 01:13


All times are GMT -4. The time now is 05:00.