CFD Online Discussion Forums

CFD Online Discussion Forums (
-   STAR-CD (
-   -   velocity-dependent diffusivity (

porterma August 17, 2009 15:01

velocity-dependent diffusivity
I am using star-cd (version 4.06). I need to define a velocity-dependent 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 star-cd. My calculation is very simple:

PORODF = 0.0522*v + 1e-8

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.

Pauli August 17, 2009 19:58

At the top of pordif.f you should have this line:
It will provide U,V,W in global cys. See for details. & will appear in your ufile directory when you compile (star -ufile).

porterma November 5, 2009 14:18

direction-dependent difusivity
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 star-cd in awhile. Thus, I now return to my problem. I implemented the velocity-dependent diffusivity for each region in my model domain as follows:


  PORODF = 0.00152*SQRT(UL**2 + VL**2 + WL**2) + 3.6431E-10

I have one question regarding this implementation. I wasn't sure if UL, VL and WL are the appropriate velocity components or if I should be using U, V and W. In porous media flows, there is a superficial velocity and a pore velocity; they are related by the porosity (i.e., pore velocity equals the superficial velocity divided by the porosity). Based on the description of each I could not determine if if U or UL was the pore velocity. Does anyone know which is which.

My other concern is that in porous media flow the diffusivity becomes a tensor (similar the alpha and beta tensors that are implemented in star-cd). 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:


  PORODF = 0.00152*UL + 3.6431E-10
  PORODF = 0.00152*VL/10 + 3.6431E-10
  PORODF = 0.00152*WL/10 + 3.6431E-10

The problem here is that I can't find the variable (the ??? in the above pseudo code) used to identify each component of flow?

Thanks in advance.

Pauli November 5, 2009 15:03

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 psuedo-code would work.

Both are good questions for CD-adapco support.

All times are GMT -4. The time now is 10:17.