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

Making density dependent on concentration

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   November 9, 2010, 04:53
Default Making density dependent on concentration
  #1
New Member
 
Join Date: Aug 2010
Posts: 14
Rep Power: 15
NewFoamer is on a distinguished road
Hello,

My current solver is based on the incompressible pimpleFoam, in which I've added a solver for solute concentration C:

Code:
solve
    (
    fvm::ddt(C)
    + fvm::div(phi, C)
    - fvm::laplacian(Diff, C)
    );
Now, I would like to have the fluid density depend on the solute concentration according to:

Code:
rho = base_value + rho_factor * C
Not having much experience with OpenFOAM, I'm a bit in the dark about how to go about implementing this. I can't claim to fully understand the compressible solvers I've looked at yet, but I'm not sure I have to go there either? Already having the C field in place, it shouldn't be neccesary to create a rho field as well? given the simple relation that is.

Currently, the momentum equation is solved as follows:

Code:
tmp<fvVectorMatrix> UEqn
(
    fvm::ddt(U)
  + fvm::div(phi, U)
  + turbulence->divDevReff(U)
);
Basically, the question is, how do I go about implementing this? any hints or help would be appreciated!
NewFoamer is offline   Reply With Quote

 


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
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 01:24
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51
REAL GAS UDF brian FLUENT 6 September 11, 2006 08:23
Warning 097- AB Siemens 6 November 15, 2004 04:41


All times are GMT -4. The time now is 15:03.