|
[Sponsors] |
December 6, 2005, 04:38 |
Hello everybody,
I have a q
|
#1 |
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 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Source Terms | Sas | Main CFD Forum | 5 | November 24, 2006 04:40 |
Source terms... again | AdN | FLUENT | 9 | April 27, 2006 05:34 |
Source Terms | Rajan | CFX | 1 | March 14, 2005 10:26 |
Help.. Source terms.. | Diana | FLUENT | 1 | July 4, 2002 01:06 |
UDF for source terms | Tom | FLUENT | 1 | April 26, 2002 02:13 |