
[Sponsors] 
August 17, 2009, 15:01 
velocitydependent diffusivity

#1 
New Member
Mark Porter
Join Date: Aug 2009
Posts: 2
Rep Power: 0 
I am using starcd (version 4.06). I need to define a velocitydependent diffusivity coefficient for a passive scalar. I have worked out that I need to write a subroutine using pordif.f. What I can't figure out is how I access the magnitude of the velocity that has already been calculated by starcd. My calculation is very simple:
PORODF = 0.0522*v + 1e8 where v is the velocity magnitude at every location in my volume. It seems like should be very easy, but I can not find any documentation regarding this matter. Thanks in advance. 

August 17, 2009, 19:58 

#2 
Senior Member
Pauli
Join Date: Mar 2009
Posts: 183
Rep Power: 9 
At the top of pordif.f you should have this line:
INCLUDE 'usrdat.inc' It will provide U,V,W in global cys. See nom.inc for details. usrdat.inc & nom.inc will appear in your ufile directory when you compile (star ufile). 

November 5, 2009, 14:18 
directiondependent difusivity

#3 
New Member
Mark Porter
Join Date: Aug 2009
Posts: 2
Rep Power: 0 
Thank you for the reply Pauli. I know this is very late, but we had some license issues here and I haven't been able to use starcd in awhile. Thus, I now return to my problem. I implemented the velocitydependent diffusivity for each region in my model domain as follows:
Code:
IF(NPPOR.EQ.1) THEN PORODF = 0.00152*SQRT(UL**2 + VL**2 + WL**2) + 3.6431E10 ENDIF My other concern is that in porous media flow the diffusivity becomes a tensor (similar the alpha and beta tensors that are implemented in starcd). But the diffusivity is treated as a scalar. In the code above I technically need a PORODF for each component (x,y,z) of flow. It appears that I need additional if statements that identify each component of flow. For example, the if statements should look something like this: Code:
IF(???.EQ.1.AND.NPPOR.EQ.1) THEN PORODF = 0.00152*UL + 3.6431E10 ENDIF IF(???.EQ.2.AND.NPPOR.EQ.1) THEN PORODF = 0.00152*VL/10 + 3.6431E10 ENDIF IF(???.EQ.3.AND.NPPOR.EQ.1) THEN PORODF = 0.00152*WL/10 + 3.6431E10 ENDIF Thanks in advance. porter 

November 5, 2009, 15:03 

#4 
Senior Member
Pauli
Join Date: Mar 2009
Posts: 183
Rep Power: 9 
U is velocity in the global CSYS. UL is the velocity in the porous media CSYS. I don't know if it is superficial or otherwise.
It looks like diffusivity is implemented as isotropic (i.e. a scalar). I have no idea how you can make it otherwise. I don't think your psuedocode would work. Both are good questions for CDadapco support. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
time dependent velocity input by user subroutine  shohel mahmud  CDadapco  4  December 18, 2007 12:40 
Velocity in Porous medium : HELP! HELP! HELP!  Kali Sanjay  Phoenics  0  November 6, 2006 07:10 
A velocity dependent kepsilon boundary condition  tangd  OpenFOAM PreProcessing  2  September 15, 2006 07:04 
Variables Definition in CFX Solver 5.6  R P  CFX  2  October 26, 2004 02:13 
Terrible Mistake In Fluid Dynamics History  Abhi  Main CFD Forum  12  July 8, 2002 09:11 