CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   USRSRC (

Alex January 22, 2002 10:00


I am simulating two phase (air and water) flow with homogeneous model. There are suspended solids in water . I want to impose the presence of solids in only one phase (water).

To this aim, I used USRSRC, with those values : Am=0 (for 6) SU=0 SP=1

But it doesn't work ?

Astrid January 27, 2002 17:17

use sp=-1

henry January 28, 2002 04:41

What is USRSRC?

What is USRSRC?

please brief be on this.



Alex January 28, 2002 06:07

Astrid, Henry,

Thank you for your answer... I have tried both (sp=1, sp=-1) => Still does not work.

Prescribing a MASS FRACTION value works only when I use one phase approach (say for example water and sediments). I used a "user3D patch" on which I set : Su=0 and Sp~-1E10. I explain => The Matrix is writen (solver manual): ap*Mp = sum(nb){anb*Mnb}+Su with ap=sum(nb)-sp+sum(convectives flux)+time(term) {*}

If you want to prescibe Mp value (=V) : ap=1 su=V anb=0

But with USRSRC {for henry --> fortran routine wich allows "the skilled users" ;-) to add source and sink terms in equations} we can only change su, sp ,anb. But not ap. That is the reason why I have prescribe a big value for sp (~1e10) in order it prevails in ap calculation {*}.

For a two phase flow (air-water) + massfraction. It doesn't work. Why ? In CFX4.3 solver manual (pdf : page 3-746) it is said that the software is able to do that. I'am still "looking for details on how to do this"....


Astrid January 28, 2002 07:07

'It doesn't work'. What do you mean by that? Do you get an overflow? Runtime error? Wrong position? No effect at all? Please be more specific.


Alex January 28, 2002 11:05

I try two flow configurations.

1/ Dam break configuration (Ref29) ,in which I added 1 mass fraction equation. Initialy, the mass fraction field has a constant value.

For exemple : 2D case i=1..20 j=1..20 intial field for water => i=1..8 j=1..20 intial field for mass fraction => i=1..5 j=1..10 intial field for air=> i=9..20 j=1..20

After some time steps, the mass fraction field is diffuse in water and in air. massfraction goes accross the boundary between the two phases (air and water). while I am expecting no mass fraction in air. ----> It is why I say it doesn't work ...

2/ 2D Open chanel flow with massfraction transport equation. massfraction is injected at water inlet. I have still the same problem ...

Thank you for your Help


Alex January 28, 2002 11:17

Re: What is USRSRC?

USRSRC --> fortran routine wich allows "the skilled users" ;-) to add source and sink terms in equations. You can find more at page 3-554 of solver manual.

If your source term is quite simple, you can use command language directly. I advise you begining with exemple reference 12, at first.


Astrid January 29, 2002 17:13

Up till now, I think you want to 'freeze' the flow (both liquid and gas) locally to simulate the presence of solids. Then you have to set am=0, Su=0 and Sp=-1 for u,v and w for the liquid and gas phase. This should work.

Why do you use a Mass fraction for the solids? Then, to keep the solids on their position, you have to define a density which is a function of the mass fraction. This will become tricky, especially as your mass fraction will diffuse through your domain, unless you take special care.

Does this help? (Sommige mensen........)


Alex January 30, 2002 07:11

I think that I didn't clearly explain the case that I have to modelize.

The case deals with simualting an open chanel flow(exple: a river). I use the homogeneous model in order to calculate water depth variations. With this model I known where are located water and air fields.

Next I add sediments.

The river is loaded with solids that have settling velocity. This can be achieved using the Algebraic Slip Model with USRSLP when the problem is only : water and sediments (the interface between air and water, could be simulated as wall with "SLIP" bondary condition). But in my case, since the water depth variation is important, I have to know its location too. So I am forced to use the homogeneous model to track the water surface and a scalar transport equation (for sediments concentration field). The sediments are transported in water and not in the air. That is the reason why I want to use the USRSRC subroutine in order to avoid that sediments be present in air.

I hope that you have a better understanding on my problem. Perhaps if I have used the word 'sediment' instead 'solid' it would have been easier...

Know "it works"..You are right : am=0 Su=0 Sp=-1

I was mistaking while using IPALL... sorry...

Thank you for your help... :)


All times are GMT -4. The time now is 01:23.