![]() |
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. |
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). |
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:
Code:
IF(NPPOR.EQ.1) THENMy 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: Code:
IF(???.EQ.1.AND.NPPOR.EQ.1) THENThanks in advance. porter |
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 16:02. |