CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Phoenics

accessing the source and sink per cell in patchs

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 28, 2009, 12:32
Default accessing the source and sink per cell in patchs
  #1
Noel
Guest
 
Posts: n/a
Dear all, In the result file under the whole-field residuals, we can find the description of source, sinks & the nett sum of each PHI variables in their associated patchs.

As opposed to the result file which only shows the total source and sink over the whole cells of each patch, I need the value of source and sink in each cell of the Patch.

Are they stored in specific variable and is there any straightforward way in the GROUND station to access these values ?

Best Regards, Noel
  Reply With Quote

Old   March 2, 2009, 07:21
Default Re: accessing the source and sink per cell in patc
  #2
Alex
Guest
 
Posts: n/a
Dear Noel As far as I know, the values of source is obtain by numerical integration of transport properties at the boundaries or patch as used by PHOENICS. If you are solving the contunuity, momentum and energy equations, the values of the source refers to the overall mass flowing the patch and the corresponding overall momentum component, and the total energy. If I understood it correctly, the net source implies as if the values for mass balance, integral momentum theorem, and energy balance respectively for the whole solution domain. These mean the net source is not stored in the phi files, but was separately calculated in EARTH

As we are solving the problems iteratively, it is difficult to get zero net source for mass, momentum and energy balance. Convergence of the solution can be justified if the magnitude of the convergence criteria and the net transport properties balance is relatively small. More simplified explaination should be given in the PHOENICS documentation. Hope someone can correct me if I am wrong
  Reply With Quote

Old   March 2, 2009, 08:04
Default Re: accessing the source and sink per cell in patc
  #3
Noel
Guest
 
Posts: n/a
Alex, thank's for the reply.

If the source and sinks are separately calculated in EARTH, is there any way to retrieve these values using Main.for or Ground.for ?

Regards, Noel

  Reply With Quote

Old   March 3, 2009, 07:07
Default Re: accessing the source and sink per cell in patc
  #4
mike
Guest
 
Posts: n/a
You can call subroutine GETSOR from Group 19 Section 7 of GROUND (each of sweep section). The syntax is :

CALL GETSOR('patch name',variable index,net source)

So, CALL GETSOR('INLET',P1,GMASFR) will return the mass inflow rate via GMASFR for the patch named 'INLET'.

  Reply With Quote

Old   March 3, 2009, 07:18
Default Re: accessing the source and sink per cell in patc
  #5
mike
Guest
 
Posts: n/a
As mentioned in the other posting, the total source/sink can be retrieved via Subroutine GETSOR. Printout of the cell-wise sources/sinks can be obtained by means of the PHOENICS debug facilities. If you need to access the cell-wise sources directly in GROUND, this is best done by means of re-construction, and Subroutine GETCOV may be useful in this regard. The syntax is : GETCOV(NAME,PHI,CO,VAL), which returns the coefficient and value for the specified patch and variable name.
  Reply With Quote

Old   March 3, 2009, 11:36
Default Re: accessing the source and sink per cell in patc
  #6
Noel
Guest
 
Posts: n/a
Thank's a lot, Mike ! I just tried the Getcov Subroutine in Group 19 Section 7 of GROUND (Finish of sweep) to retrieve the value of CO and VAL, yet it only returns a scalar value (not in array) though the Getcov argument is an array.

I define my patch over 5 cells and set the CO and VAL in Group 13 of GROUND. So the CO and VAL should be an array of 5 elements. Is there any trick to get the array ?

Regards, Noel

  Reply With Quote

Old   March 3, 2009, 11:48
Default Re: accessing the source and sink per cell in patc
  #7
mike
Guest
 
Posts: n/a
GETCOV is not intended to access an array of CO and VAL values, only scalar values of CO and VAL.

I now realise I don't understand what you are trying to do. If CO and VAL are defined by you in Group 13 of GROUND, then you already have an array of values for CO and VAL, and so it should be trivial to re-construct the source/sink term, i.e. For example, S = CO*T*(VAL-Phi,p) for a non-mass-flow source.
  Reply With Quote

Old   March 3, 2009, 12:14
Default Re: accessing the source and sink per cell in patc
  #8
Noel
Guest
 
Posts: n/a
I indeed try to reconstruct S = CO*T*(VAL-Phi,p) using the convergent Phi,p. I just don't know how to get the value of CO and VAL of every patch and variable in the Group 19 (I only want to reconstruct them after it converges).

In the Group 13, the IF(NPATCH.EQ.'Patch') and IF(INDVAR.EQ. PHI) are used to get access to the corresponding CO and VAL and also the corresponding IXF, IXL, IYF and IYL.

I suppose we can't use IF(NPATCH.EQ.'Patch') and IF(INDVAR.EQ. PHI) in the Group 19 to get the corresponding L0F(CO), L0F(VAL), IXF, IXL, IYF and IYL cause they are sent by EARTH (just like the variable ISC and IGR).

Regards, Noel
  Reply With Quote

Old   March 3, 2009, 20:22
Default Re: accessing the source and sink per cell in patc
  #9
Alex
Guest
 
Posts: n/a
Dear Noel

I have one simple bad trick. It is not a good trick however. You can use the q1 file and give the name of the patch using the do loop.

regards
  Reply With Quote

Old   March 4, 2009, 05:39
Default Re: accessing the source and sink per cell in patc
  #10
mike
Guest
 
Posts: n/a
CO and VAL are refreshed for every variable after the residual errors are computed in EARTH on exit from Group 13 of GROUND (PHOENICS solves the finite-volume equations in correction form). Therefore, these are variables are not available in Group 19.

If S = CO*T*(VAL-Phi,p)is computed in Group 13, then this will correspond to the converged solution after a sufficient number of sweeps.
  Reply With Quote

Old   March 4, 2009, 07:09
Default Re: accessing the source and sink per cell in patc
  #11
Noel
Guest
 
Posts: n/a
Hi Mike, thank's for the suggestion.

I have COVAL of some PHI variables in the same patch, whose coefficient and values are set in the GROUND. In which section of Group 13 should I compute S = CO*T*(VAL-Phi,p) ?

Suppose I do it in Section 1 (the setting of CO), how can I obtain the corresponding VAL (knowing that VAL are also refreshed for every variable) ? If I am updating the CO of a PHI-X, the last updated VAL might belong to another PHI (I have no idea of the order of GROUND call from the EARTH).

Or do I have to store the VAL of every variable in another common array so that I can access them anytime in the Section 1 ?

Regards, Noel

  Reply With Quote

Old   March 4, 2009, 10:03
Default Re: accessing the source and sink per cell in patc
  #12
mike
Guest
 
Posts: n/a
For each IZ slab, Group 13 is visited for each variable in turn, first for CO, and then for VAL. I seem to recall that you can GET the CO while in the VAL section. If not, you can store the CO in the Co section, or alternatively, re-generate it in the VAL section. Then compute S in the VAL section.
  Reply With Quote

Old   March 6, 2009, 08:32
Default Re: accessing the source and sink per cell in patc
  #13
Alex
Guest
 
Posts: n/a
It seem that there is not much people interested to know more about the trick that I have mentioned.

The trick will produce the mass flow rate and its direction for each cell (for R1 -single fass) and surface forces (the sheat stress), heat transfer rate for wall, the entering enthalphy. It seem the discussion become so complex and the trick is good for beginners. You can check the results by comparing with the ground coding performed using PLANT by acquiring the values at the near wall cell.
  Reply With Quote

Old   March 24, 2009, 05:45
Default viscosité turbulent
  #14
New Member
 
ok
Join Date: Mar 2009
Posts: 17
Rep Power: 17
maher9149 is on a distinguished road
dear mike : can you tell me the steps that I can do to change the formula for turbulent viscosity in the software Phoenics. or how I can use another formula to calculate.
maher9149 is offline   Reply With Quote

Old   April 3, 2009, 07:07
Default turbulent viscosity
  #15
New Member
 
ok
Join Date: Mar 2009
Posts: 17
Rep Power: 17
maher9149 is on a distinguished road
hi if you how I can change the formula for turbulent viscosity in the software Phoenics. I want to write vt = (c * k / e) * f (k, e)
maher9149 is offline   Reply With Quote

Old   July 10, 2010, 02:45
Default Heat transfer coeffient
  #16
New Member
 
sulabh gupta
Join Date: Jul 2010
Posts: 9
Rep Power: 16
sulabh gupta is on a distinguished road
Hi mike plz help me i just want to know how to calculate the values of T cell in the formula Q=co(Tval-Tcell) over a geometry and what does it mean can we use it anywhere or any kind of geaometry wheter it is linear or pipe etc??
sulabh gupta is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
accessing upstream cell - UDF bohis FLUENT 0 April 7, 2008 06:12
Solid body becoming source or sink zonexo Main CFD Forum 2 June 29, 2006 00:22
Sink(source) for discreted particles Arnold FLUENT 0 September 22, 2005 12:40
Source/Sink question Riham FLUENT 0 April 10, 2003 20:17
source or sink?? frederic felten Main CFD Forum 2 August 8, 2000 13:35


All times are GMT -4. The time now is 04:49.