PHOENICS收敛.doc_第1页
PHOENICS收敛.doc_第2页
PHOENICS收敛.doc_第3页
PHOENICS收敛.doc_第4页
PHOENICS收敛.doc_第5页
已阅读5页,还剩15页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Convergence Monitoring and Control Convergence Monitoring and ControlContents1. Convergence Monitoring 1.1 Residuals 1.2 RESREF1.3 Spot Value 2. How to Assess Convergence 2.1 Nett source2.2 Residuals2.3 Spot values3. How to use Graphical Monitor4. How to Achieve Convergence 4.1 Linear Relaxation 4.2 False Time Step Relaxation 4.3 Advice on Relaxation 4.4 Automatic Relaxation 5. Other relaxation control 5.1 Solver Controls 5.2 Limiting Values 5.3 K-E Linearisation 6. Convert the residuals obtained with SELREF=T to residuals normalised by reference inflow quantities. 1. Convergence Monitoring 1.1 ResidualsThe residuals are the quantities used in PHOENICS to monitor the convergence procedure. These are the imbalances in the FVE, defined as:ep = ap(f p) - S (ai(f i-f p) - Sf i=W,E,S,N,H,L,T where W,E,S,N,H and L denote space directions; T denotes time-direction.The aim of the computation is to reduce them to an acceptable magnitude.During the computation, the residuals are printed by Earth to the VDU, or are displayed graphically as shown in Figure 4.The frequency of display update is controlled by the PIL variable TSTSWP, which is set in the VR-editor Main menu / Output / Monitor update frequency panel. This panel also determines whether the data is shown graphically or in ASCII.Figure 1 shows the panel when the Main menu/output is clicked in VR-Editor. “Monitor display mode”: GRAPHICS and “Monitor update frequency”: 1 indicate that during the computation, the residuals are displayed graphically on the screen and updated every iteration. The monitor-cell location for the spot values are also set here.Please note that the monitor update frequency is internally calculated if LSWEEP is large and the user is not able to control the frequency. Figure 1. Main menu/Output panel in VR-EditorThe PIL setting in a Q1 file should be: TSTSWP = N where n is the update frequency. N 0 indicates that the residuals are printed to the VDU in ASCII; N0 indicates that the residuals are displayed on the screen graphicallyThe quantities printed out are, in fact,S |ep| / RESREF (f )where the sum is extended to the whole field.When the sum of errors divided by RESREF, which is to be explained below, falls below 1.0, solution for that variable stops. However, the residual continues to be computed for the variable, and should it rise above 1.0, the variable re-enters the solution cycle. When the residuals for all variables fall below 1.0, sweeping stops. Otherwise, the computation will stop when the last sweep (LSWEEP) is reached. 1. 2 RESREFRESREF is a normalisation value and a PIL variable used in Q1 files. EARTH can automatically calculate values for RESREF, based on the net sum of fluxes for a variable, if the PIL variable SELREF=T. Cases set through the VR-Editor have this as a default, but it is not set in all library cases.The supplementary variable RESFAC acts as a tolerance. For example, a setting of 0.01 means that sweeping stops when the errors are 1% of the reference fluxes.These two variables can be set from the VR-Editor Main menu / Numerics / Relaxation control panel as shown in Figure 2 where SELREF is set to T and RESFAC is set to 0.001. Figure 2. Main menu/Numerics/Relaxation control panel When SELREF is set to T, the value of RESREF calculated by EARTH isRESREF(f ) = RESFAC*TOTFLO(f )/(NX*NY*NZ)TOTFLO(f ) is the summation of all sources for variable f, including sources associated with convection and diffusion transport. It contains terms of the form:SOURCES: SUM1 SUM2 Cf (Vf -f p) SUM1 is over all cells, SUM2 is for all sourcesCf is the coefficientVf the valuef p is the in-cell value of f CONVECTION: SUMi (max(0,(Mdot*f I) + time-flux)SUMi is for all directions Mdot is the mass flow rate time-flux for steady cases is zero, for transient is (abs(Mdot*f )T - abs(Mdot*f )Told)/DTDIFFUSION: SUMi (max(0,(G f *A*(f i - f p)/D )sumi is for all directions Gf is the diffusion coefficient D the internodal distance A is the cell-face areaFor pressure, TOTFLO(P1) is SUMi MAX(0,(Mdot), sumi is for all directions.RESREF is updated at the end of each sweep, when IZSTEP=NZ. For W1 and W2, RESREF would be updated at the end of the sweep when IZSTEP=NZ-1.If SELREF=F, the user is free to set their own values for RESREF for each variable. The default value of 1E-8 is small enough to ensure that sweeping does not stop before LSWEEP. RESREF values can be set from the VR-Editor Main menu / Numerics / Iteration control panel (but only if SELREF is set to F in Numerics/Relaxation control panel) as shown in Figure 3. Figure 3. RESREF values can be set from the VR-Editor Main menu/Numerics if RESREF=FA suitable value for RESREF is often the inflow source for that variable. This can either be calculated in Q1, or obtained from the Net Sources printout near the end of the RESULT file from an earlier run.RESREF(f) would then be set to Tolerance*Inflow-Flux, where Tolerance can be say 0.01. Solution for the variable would stop when the sum of errors is less than 0.01 of the inflow flux of that variable.The units of RESREF are always those of the equation in question. For the velocities, they are Newtons, for H1 or TEM1 they are Watts. The only exception is P1, where the error printed is a volume error, so RESREF(P1) has units of m3/s1.3 Spot ValuesAlso visible on the screen (see Figure 1 above) is a display of variable values at a user-specified monitor location in the grid; this location can be changed during the simulation. If convergence has been achieved spot values at all locations must be unchanging. 2. How to Assess ConvergenceThere are three main tools that are used to determine whether reasonable convergence has been achieved: source balance residual behaviour spot value behaviour. The three aspects can be checked by examination of the result file for source balance and of the graphical monitoring for residual and spot value behaviour as explained below.2.1 Nett SourceGood source balance should give a discrepancy between the positive and negative sums (Nett source) that is a small percentage of either; values of 1% should usually be achieved, and considerably lower figures are not uncommon - but a law of diminishing returns applies, with the cost in CPU time of the extra convergence being rather greater than that required to get to a reasonable level.Near the bottom of the RESULT file you will find the following Nett source printout given for all boundary conditions and source terms, including the reference inflow rates of each dependent variable: Nett source of R1 at patch named: OB7 (INLET ) = 2.675E-02 Nett source of R1 at patch named: OB8 (OUTLET ) =-2.675E-02 pos. sum= 2.675250E-02 neg. sum=-2.675221E-02 nett sum= 2.905726E-07 Nett source of TEM1 at patch named: OB7 (INLET) = 7.878E+03 Nett source of TEM1 at patch named: OB8 (OUTLET) =-7.947E+03 Nett source of TEM1 at patch named: OC2 (WALL-L) = 1.000E+02 pos. sum= 7.977676E+03 neg. sum=-7.947496E+03 nett sum= 3.018018E+01Check: The above print-out from a case with the following input: 1. Inlet velocity : v=0.05m/s 2. Air density: 1.189kg/m3 3. Specific heat of Air: 1005 J/kg 3. Inlet temperature: 20C 3. Inlet area: 0.45 m2The total mass inflow is: 0.05x1.189x0.45 = 0.0267525 kg/s which is the Nett Source of R1 at INLET. Heat flux (W) = mass inflow x temperature x specific heat = 0.0267525x (273+20)x1005 = 7877.67 W which is the Nett Source of TEM1 at INLET. The above printout shows that the mass inflow (R1) at INLET and outflow at OUTLET is well balance. The inflow carries a total heat of 7878W into the domain and the 100W heat transferred to flow from WALL-L; the outflow takes a total heat of 7947W out of the domain. There is 30W (1%) heat imbalance. Source imbalance is a clear indication that convergence has not yet been achieved; source balance does not, though, necessarily indicate that convergence has been achieved - residual and spot value behaviour should also be considered.2.2 ResidualsInterpretation of residuals can be difficult and very subjective. What is certainly true is that residual values should typically go down by at least a factor of 100 from the value after the initial few sweeps (assuming that the calculation is starting from an arbitrary initial state). Eventually, the residuals are likely to level out, with small oscillations about a fairly constant value. This is usually an indication of convergence, but not always: too tight relaxation can sometimes suggest this sort of behaviour because variables are not able to change by much on each sweep, while too loose relaxation can prevent residuals falling further because the variable values are oscillating.2.3 Spot ValuesSpot value behaviour is therefore useful in determining whether or not the levelled residuals can be trusted! If the spot values in a representative region of the flow have settled down to a more-or-less constant value, it is reasonable to assume (if the residual behaviour looks promising) that convergence has been achieved; if the changes are still significant, convergence has not been achieved. Some care is still needed though: apparent settling down of spot values might be caused by too-tight relaxation, resulting in a very slow drift that can be mistaken for real convergence. Both residuals and spot values can be monitored in graphical monitoring during calculations as shown in Figure 4 in the next section. The spot values are displayed on the left side and the residuals are displayed on the right of the graphical monitoring screen. Details about how to read and use the graphical monitoring will be explained in Section 3.2. How to use Graphical MonitoringThe graphical display of convergence during calculations can be activated in the VR-Editor. A picture of graphical monitoring screen is shown in Figure 4 below. Figure 4. Graphical monitoring screenAs seen from the picture, the following items can be monitored: the spot values at the selected monitor-cell location (IX=34, IY=2 and IZ=5) are displayed on the left. The current sport value of each solved variable and its change from the previous iteration is also displayed numerically. The names of these solved variables are shown in the middle of the screen under Variable. the residuals (error) is displayed on the right. The error has been explained in section 1.1. The error and its change from the previous iteration is also displayed numerically. .The total grid numbers, NX, NY and NZ used for the calculation are displayed on the left bottom corner. ISWEEP 263 indicates that the current iteration number is 263 during the calculation (m:s) est (4:12) is the estimated total time (4 minutes and 12 seconds) required for the calculation Time now (2:12) is the time has currently used Min and Max are the maximum and minimum values during the calculation. These values are used for normalisation of all the sport values A number 3 (monitor update frequency) displayed on the upper right corner indicates that during the computation, the residuals are displayed graphically on the screen and updated every 3 iteration frequency. As seen from the blue message on the monitoring screen, the user can press any character key on the key board to interrupt the calculation and several function buttons will appear on the screen as shown in Figure 5. Figure 5. The calculation was interrupted by the user.ResetThe user may press the Reset button is to check or change the relaxation factors during the calculation as shown in Figure 6. Figure 6. The Reset panelDumpThe user may press the Dump button to dump PHI or XYZ (BFC only) files at the current iteration as shown in Figure 7.Figure 7. The Dump panelMonitorThe user may press the Monit button to change the monitor-cell location as shown in Figure 8. Figure 8. The Monit panelEndjobIf the Endjob button is pressed, the calculation will stop, but the results at the current iteration will be produced.AbortIf the Abort button is pressed, the calculation will stop without producing any results.GoThe Go button is for continuation of the calculation. Figures onThe user can toggle between Figures on or Figures off to dispay or not to display numerical sport values and residuals. The latter may save calculation time for large cases. end Pause onThe user can toggle between end Pause on or end Pause off . If end Pause is ON, the following picture shown in Figure 9 will appear on the screen when the last iteration is completed, but the calculation is paused before producing results until the user presses the orange-colour END button. Figure 9. The calculation has completed the last iteration and paused.If the Abort button on the above screen is pressed, the calculation will end without producing any results.The calculation will end automatically if end Pause off is selected. This button has been designed for the user who may not watch the calculation, but may wish to examine the convergence before the convergence monitoring disappears on the screen. It is no longer necessary for PHOENICS V3.4 or later versions as the last picture of the convergence monitoring is always saved to the gxmoni.gif file. Special This button should not be used except for MFM library cases.Important note: There is a file called CHAM.INI in the directory, /phoenics/d_allpro. The user may modify the settings in Monitor section as the default for graphical monitoring. Monitor Sweep = on Figures = on Pause = off Spinner = off zplanes = off Time = onThe actions made on the graphical monitor during the calculation only affect the current calculation. The settings of graphical monitoring can be permanently modified in VR-Editor/Option menu as shown in Figure 10. Figure 10. Monitor option menu 4. How to Achieve ConvergenceThe golden rule is to build a CFD model step-by-step on a coarse mesh rather than introduce all the necessary geometrical and physical features all at once on a fine mesh. Experience shows a step-by-step approach is usually quicker. The reason is that in the event of convergence problems, the origin of these problems can be detected relatively easily or even identified immediately as the result of the introduction of a new feature. The most widely-known technique for achieving convergence is the use of relaxation. This slows down (relaxes) the changes made to the variables from sweep to sweep. Relaxation does NOT alter the final solution, only the way in which it is achieved. Two types of relaxation are available: linear and false time-step.4.1 Linear relaxation:Solution of the finite-volume equations generates a field of f values (fnew). Linear relaxation replaces this withfnew= fold + a(fnew - fold)where fold is the value from the previous sweep; a (between 0 and 1) is the relaxation coefficient. A relaxation coefficient of 0 prevents any change from the previous sweep; a value of 1 applies no relaxation.4.2 False time-step relaxation:False time-step relaxation modifies the finite-volume equations by adding an additional, pseudo-transient term:(mass in cell)*(fold - fnew)/Dtfwhere Dtf is the false time-step.A large value of Dtf makes the additional term small (light/loose relaxation); a small value makes the additional term large (heavy/tight relaxation). In between, there is a large range of Dtf values, which make the term approximately the same order of magnitude as the other terms in the equation. The term then acts to damp down violent sweep-to-sweep changes, which may lead to divergence.The question now arises - how to estimate values for Dtf? It is usually best to base it on some characteristic time-scale of the process. One time scale is based on convection (minimum distance)/(maximum velocity), another is based on diffusion (minimum distance)2/(kinematic viscosity). Other time scales can be based on KE/EP or buoyancy. Normally the smallest of these will be used, multiplied by some factor.A typical starting point is the domain length divided by the inlet velocity divided by the number of cells in that direction - i.e. typical cell residence time.The following is an example for estimating values for Dtf based on conv

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论