CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Phoenics (https://www.cfd-online.com/Forums/phoenics/)
-   -   contribution of convective source in total source? (https://www.cfd-online.com/Forums/phoenics/52286-contribution-convective-source-total-source.html)

 Antony July 27, 2008 21:31

contribution of convective source in total source?

Hi all, I just read a Phoenics document concerning source. I can't grasp the understanding of convective source of a conserved variable (PHI) as a result of setting COVAL(Patch_Name,PHI,C,Vphi) : S_phi = T*C*(V_phi - Phi_p) + max(0,Sp)*(V_phi - Phi_p) where Sp is mass source imposed to the same patch.

Suppose I already set a positive mass source Sp in a patch X. Now I want to set the total source of a conserved variable (Phi) in the patch X as S_phi = 20*(10 - Phi_p). I thought this was simply done by setting COVAL(X,Phi,20,10). But having read a Phoenics document about convective source, I am confused. Given the mass source Sp, does it mean I need to set COVAL (X,Phi,20-Sp/T,10) so that in total I will have : S_phi = T*(20- Sp/T)*(10 - phi_p) + Sp*(10 - phi_p) = T*20*(10 - phi_P) ?

My understanding prior to this was that, after defining a mass source S, we also need to set the value (let's name it VS_Phi) of Phi transported by the source S, thus giving the total source : S_phi = T*20(10 - phi_p) + S*VS_Phi Now I don't understand the importance of setting this VS_phi if the total source is defined by T*C*(V_phi - Phi_p) + max(0,Sp)(V_phi - Phi_p)

I also tried to work out this source with the Phoenics Mathematical Basis, but still cannot catch how this convective source T*C*(V_phi - Phi_p) + max(0,Sp)*(V_phi - Phi_p) come about in the equation.

Can somebody release my deep confusion ?

Regards, Antony

 Mike July 29, 2008 09:01

Re: contribution of convective source in total sou

The source of Phi associated with a mass source patch is given by:

S_phi = [ C_phi*T + max(0,Sp)]*(V_phi - Phi_p)

where Sp = C_p*T*(V_p - P_p)

and T is a geometric multiplier, such as area.

As an example, the PATCH settings would be:

PATCH(X,WEST,1,1,1,NY,1,NZ,1,LSTEP) COVAL(X,P1,FIXFLU,mf_in) COVAL(X,U1,ONLYMS,u1_in) COVAL(X,C1,ONLYMS,c1_in)

so that T=Aw (west area), C_phi=ONLYMS=0.0, and

Sp = mf_in*Aw

with mf_in>0.0

Thus,with V_c1=c1_in and V_u1=u1_in, we have

S_C1 = mf_in*Aw*(c1_in - c1_p)

and

S_u1 = mf_in*Aw*(u1_in - u1_p)

The coeffcient C_phi would be greater than zero if one wished to account for the diffusive inflow of material.

 Antony July 30, 2008 00:26

Re: contribution of convective source in total sou

Thank's a lot, Mike. A nice example. Your first sentence makes me doubt my understanding.

With the source defined by : S_phi = [ C_phi*T + max(0,Sp)]*(V_phi - Phi_p) Which one is true in the following ? 1. S_phi is the total source of Phi in a cell designated by the patch 2. S_phi is a source of Phi associated with a mass source patch only (not the total source of Phi) ?

If I have the following setting (with mf_in > 0) : PATCH(X,WEST,1,1,1,NY,1,NZ,1,LSTEP) COVAL(X,P1,FIXFLU,mf_in) COVAL(X,C1,ONLYMS,c1_in) PATCH(Y,CELL,1,1,1,NY,1,NZ,1,LSTEP) COVAL(Y,C1,Cov,c2_in) which one is true in the following ?

1. S_C1 = mf_in*Aw*(c1_in - c1_p) + [Cov + mf_in*Aw]*(c2_in - c1_p) 2. S_C1 = mf_in*Aw*(c1_in - c1_p) + Cov*(c2_in - c1_p)

Regards, Antony

 Antony July 30, 2008 00:35

Re: contribution of convective source in total sou

Sorry, this is the correct post. I forgot to preview the previous message.

-----------------------------------------------------------

Thank's a lot, Mike. A nice example.

Your first sentence makes me doubt my understanding.

With the source defined by :

S_phi = [ C_phi*T + max(0,Sp)]*(V_phi - Phi_p)

Which one is true in the following ?

1. S_phi is the total source of Phi in a cell designated by the patch

2. S_phi is a source of Phi associated with a mass source patch only (not the total source of Phi) ?

Likewise, if I have the following setting (with mf_in > 0) :

PATCH(X,WEST,1,1,1,NY,1,NZ,1,LSTEP) COVAL(X,P1,FIXFLU,mf_in) COVAL(X,C1,ONLYMS,c1_in)

PATCH(Y,CELL,1,1,1,NY,1,NZ,1,LSTEP) COVAL(Y,C1,Cov,c2_in)

which one is true in the following ?

1. S_C1 = mf_in*Aw*(c1_in - c1_p) + [Cov + mf_in*Aw]*(c2_in - c1_p)

2. S_C1 = mf_in*Aw*(c1_in - c1_p) + Cov*(c2_in - c1_p)

Regards,

Antony

 mike July 30, 2008 06:15

Re: contribution of convective source in total sou

S_phi is a source of Phi associated with a mass source patch only.

If you have the following settings (with mf_in > 0) :

PATCH(X,WEST,1,1,1,NY,1,NZ,1,LSTEP) COVAL(X,P1,FIXFLU,mf_in);COVAL(X,C1,ONLYMS,c1_in)

and

PATCH(Y,CELL,1,1,1,NY,1,NZ,1,LSTEP) COVAL(Y,C1,Cov,c2_in)

Then PATCH X creates a "mass-flow" source for C1 givcen by:

S_C1_X = mf_in*Aw*(c1_in - c1_p)

and PATCH Y creates a C1 source given by:

S_C1_Y = Cov*(c2_in - c1_p)

Consequently, the total source of C1 is given by (2) at the bottom of your posting, ie:

S_C1_TOT = S_C1_X + S_C1_Y

= mf_in*Aw*(c1_in - c1_p) + Cov*(c2_in - c1_p)

S_phi defines total source for phi

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