|
[Sponsors] |
Variable diffusion coefficient for scalar transport in interFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 5, 2013, 20:11 |
Variable diffusion coefficient for scalar transport in interFoam
|
#1 |
New Member
Adam
Join Date: Mar 2012
Location: St. Paul, MN
Posts: 12
Rep Power: 14 |
Hi all,
I am looking to add a variable diffusion coefficient to an advection diffusion equation I added in interFoam to model mass transport in turbulent free surface flows. The coefficient should be weighted based on the value of alpha1 in each cell, i.e. D = Dl*alpha1+Dg*(1-alpha1) where Dl and Dg are scalars. It should also include the addition of turbulent diffusion if alpha1 does not equal 0 or 1, i.e. not at an interface. I included the following in the createFields.H header: Code:
dimensionedScalar Dl ( twoPhaseProperties.lookup("Dl") ); dimensionedScalar Dg ( twoPhaseProperties.lookup("Dg") ); Code:
Info<< "Reading field D\n" <<endl; volScalarField D ( IOobject ( "D", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), (Dl*alpha1+Dg*(scalar(1)-alpha1)) ); Code:
volScalarField Dt = D+(turbulence->nut())/(scalar(0.7)); forAll(D, cellI) { if ( alpha1[cellI]==scalar(1) || alpha1[cellI]==scalar(0) ) { D[cellI] = Dt[cellI]; } } fvScalarMatrix CEqn ( fvm::ddt(C) +fvm::div(phi,C) -fvm::laplacian(fvc::interpolate(D),C) ); CEqn.solve(); Thanks, Adam Last edited by amwitt; September 6, 2013 at 10:58. |
|
Tags |
interface, interfoam, mass transfer, scalar transport |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
inlet diffusion at the species transport | ahchoo | FLUENT | 1 | May 8, 2017 00:19 |
diffusion Term for add. Variable | Zaktatir | CFX | 9 | July 16, 2011 09:51 |
Latest git 1.6.x: Crash when using inletOutlet for variable alpha1 in interFoam | carsten | OpenFOAM Bugs | 6 | September 23, 2009 09:46 |
Env variable not set | gruber2 | OpenFOAM Installation | 5 | December 30, 2005 04:27 |
Source terms for additional variable transport eqn | Nandini Rohilla | CFX | 0 | February 6, 2004 13:38 |