CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Siemens (
-   -   SORSCA & FLUINJ (

KK January 28, 2008 04:30

Hi, STAR-CD experts!

Now, I am trying to make user subroutine to perform CFD of fuel cell using STAR-CD platform. I'd like to ask one thing regarding on STAR-CD user subroutine.

My problem is that the sum of scalars is not equal to 1. For example,in the anode side, H2 and H2O are being consumed there. So, I have assign those sink terms in SORSCA.f and also I assigned the corresponding mass sink in FLUINJ.f. However, I could not get the total mass fraction of 1.0. Is there anything to do to implement the scalar source/sink correctly?

Berief summary of my setting is as follows: (Here, I assume the sink is constant)

background fluid: H2 (density=ideal, viscosity=multicomp) additional scalar 1: SC1 = H2 (passive) additional scalar 2: SC2 = H2O (active)

Both of two SC are solved through 'transport' eq.


if (ICTID.EQ.2) then

if (IS.EQ.1) S1P = -2.0

if (IS.EQ.2) S1P = -1.0 endif


if (ICTID.EQ.2) then

FLUXI = -3.0 endif

Richard January 29, 2008 06:01

The problem is that FLUINJ cannot selectively extract scalars: it just extracts them in proportional to the cell concentration. So if you specify FLUXI=-3.0 and the concentrations are SCALAR(1)=0.1, SCALAR(2)=0.9, then you will be extracting 0.3 kg/m3/s of SCALAR(1) and 2.7 kg/m3/s of SCALAR(2).

If this is what you want to do then you do not need a SORSCA. On the other hand, you need a SORSCA if you want to extract scalars disproportionately. The SORSCA corrects the FLUINJ, it doesn't replace it. To extract 2 kg/m3/s of SCALAR(1) and 1 kg/m3/s of SCALAR(2), having specified FLUXI=-3.0 in FLUINJ, then you would add FLUXI*SCALAR to S1P in your SORSCA; if FLUXI is positive it can go into S2P instead. Obviously you need to calculate FLUXI in SORSCA again too. With this coding, you should find that:

- if you add the sources for scalars 1 and 2, you get zero. SORSCA is not adding or removing mass, only FLUINJ does that.

- if the target sources are consistent with cell concentrations, you should find S1P = 0.

- it diverges very quickly if you try to extract a scalar faster than is physical, i.e. the cell becomes "empty".

KK January 30, 2008 07:43

Dear Richard,

Really appreciated your kind explanation and comments.



All times are GMT -4. The time now is 05:48.