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

mass transport having different diffusity in each direction

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 8, 2013, 06:27
Default mass transport having different diffusity in each direction
  #1
New Member
 
Baek, Donghae
Join Date: Jan 2013
Location: Seoul
Posts: 24
Rep Power: 13
wes1204 is on a distinguished road
hello foamer

I am making my own solver related to mass transport in turbulent flow.

first, i made the solver of mass transport having same diffusity of concentration in each direction like:

fvScalarMatrix CEqn
(
fvm::ddt(C)
+ fvm::div(phi, C)
- fvm::laplacian(turbulence->nut() / 0.5, C)

);

CEqn.solve();

the code above is added pimple solver to calculate concentration C.

this solver is for river flow and turbulent diffusity of mass is

nut() / 0.5

it is eddy-viscosity over Prandtl number(in this case, Prandtl number is 0.5)

that is, mass spread out having same diffusion coefficient in x,y,z

but now, i want to consider different coefficient in each direction like attached equation.

different coefficient is definded D1, D2, D3 as scalar.

D1, D2, D3 is calculated by some equations.

if scalar value D1, D2, D3 can be located in vector matrix after D1,D2,D3 is calculated, i think it is easy to programming as i want.
like:
Dt=(D1, D2, D3)
//////////////////////////////////////////////////////////
fvScalarMatrix CEqn
(
fvm::ddt(C)
+ fvm::div(phi, C)
- Dt&fvm::laplacian( C)

);

CEqn.solve();
///////////////////////////////////////////////////////////

actually i dont know openfoam programming exactly.
I am just beginer for programming.
so i'm not sure whether - Dt&fvm::laplacian(C) is right expression in openfoam language or not

plz help me.

the point is make vector using scalar which is calculated
Attached Images
File Type: png eq1.png (10.9 KB, 26 views)
wes1204 is offline   Reply With Quote

Old   February 10, 2014, 10:01
Default
  #2
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22
jherb is on a distinguished road
If you haven't solved your problem meanwhile: Here is the documentation of the OpenFOAM operators:
http://www.foamcfd.org/Nabla/guides/...sGuidese4.html
jherb is offline   Reply With Quote

Old   February 21, 2014, 16:45
Default
  #3
New Member
 
Jay
Join Date: Mar 2011
Posts: 1
Rep Power: 0
jdmac6 is on a distinguished road
Did you ever figure this out? What is the syntax to access the components of the vector Dt in fvScalarMatrix?

Last edited by jdmac6; February 25, 2014 at 11:59.
jdmac6 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
Running dieselFoam error adorean OpenFOAM Running, Solving & CFD 119 February 1, 2016 15:41
questions about species transport through walls shuqin FLUENT 13 April 9, 2014 03:42
why my momentum and mass not convergence wwwuxing CFX 3 May 18, 2012 08:49
Net mass flow inlet vs outlet Nigui28 FLUENT 1 August 12, 2011 11:09
Coupled mass and heat transport yves OpenFOAM Running, Solving & CFD 1 May 5, 2006 06:33


All times are GMT -4. The time now is 06:53.