A question corcerning source terms

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

 December 6, 2005, 04:38 Hello everybody, I have a q #1 galaad Guest   Posts: n/a Sponsored Links 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 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

 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 Sas Main CFD Forum 5 November 24, 2006 04:40 AdN FLUENT 9 April 27, 2006 04:34 Rajan CFX 1 March 14, 2005 10:26 Diana FLUENT 1 July 4, 2002 00:06 Tom FLUENT 1 April 26, 2002 01:13