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

How to add a flux source to SIMPLEfoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 29, 2008, 22:19
Default Hi there I have been trying
  #1
New Member
 
ehsan vaghefi
Join Date: Mar 2009
Posts: 9
Rep Power: 17
ehsan_vaghefi is on a distinguished road
Hi there

I have been trying to add a flux source term to UEqn in SIMPLEfoam. the source term is dependent on x and y coordinates of the point. my UEqn.H looks like this at the moment, but it doesn't like it
************
// Solve the Momentum equation
volScalarField x = mesh.C().component(0);
volScalarField y = mesh.C().component(1);
volScalarField sour = x*x + y*y; //the source
tmp<fvvectormatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
);

UEqn().relax();

eqnResidual = solve
(
UEqn() == -fvc::grad(p) + sour //adding the source
).initialResidual();

maxResidual = max(eqnResidual, maxResidual);
*****************************
in general, can I add a scalar value for each element as a flux source ?

Cheers
ehsan_vaghefi is offline   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
Can I specify a passive scalar flux source in ccm+ eric Siemens 0 June 11, 2008 15:48
energy source at boundary VS wall heat flux CFX New CFX 2 June 28, 2007 04:00
wall heat flux or boundary source of energy??? Albi CFX 1 May 4, 2007 12:25
Where can I locate the source files of simpleFoam and turboFoam andycong OpenFOAM Running, Solving & CFD 2 March 6, 2006 04:33
radiation source or heat flux BC? pi CFX 4 September 10, 2004 11:44


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