How to use UnStructured PHOENICS (referred to below as USP)

Contents

How to activate USP

Activation of USP is almost the same as for structured PHOENICS (referred to below as SP).
  1. To start, the user should write a Q1 file, or create one by use of the VR-Editor, bearing in mind however that:

  2. After writing the Q1 file, the user should run satexe.exe to create an eardat file in the usual way.

  3. The satexe.exe automatically runs the utility program uspgrid.exe; this creates the necessary unstructured grid and prepares other data for USP.

  4. Thereafter the user runs earexe.exe to make flow-simulating calculations.

  5. The results are printed in the RESULT file; with some differences from the standard SP format.

  6. USP-EARTH does not produces a phi file. USP-EARTH produced files phi001.vtk and phi001.dat which can be read by ParaView and Tecplot accordingly.
    The file phi001.dat contains outcomes for Tecplot for steady cases and the files phi001.dat, phi002.dat ... phi00N.dat for transient cases.

  7. USP-EARTH also produces a phi file similar to that of SP (if automatic grid generation is not used), which can be read by PHOTON or the VR Viewer in the usual way. However, graphical display via Tecplot is preferable because Photon and Viewer can display regular grids only. The file phi001.dat contains result in a format suitable for display via Tecplot.

  8. The user can employ the PHOENICS Commander for running USP cases; or he or she can run script usp_run.bat from the inplib-folder.

Current capabilities of USP

Current limitations of USP

At present the USP has some restrictions because several physical and numerical models, which SP contains, are not implemented fully in USP yet.
Therefore at present user should be aware of the following restrictions:

Creation of unstructured grids for USP

USP has two modes of grid generation: automatic and manual.

Manual grid generation

The manual mode of grid generation uses coarsening as its grid-generation process. To set manual grid generation mode user should set UAUTO=F in Q1 or switch-off parameter in VR-Editor.

When creating a grid by means of the manual mode, the user should remember to employ the finest grid. It can be made easy using VR-Editor.

After creation of this grid, the user can create FGE-objects to indicate rectangular volumes (zones) where grid is to be coarsened.

Note that the FG in FGE stands for 'fine-grid'; this seeming anomaly arises because a facility created originally for fine-grid-embedding only is now being used for grid-coarsening also.

Coarsening joins some cells by 2 or 4 in user-selected directions. Coarsening is more flexible than refining, because the user can set the direction of coarsening, for example, in X only or Y and Z as desired.

During creation of FGE-objects the user should observe the following rules:

For example, the next lines in a Q1 create object B1, which will cause grid coarsening outside object on the first level. Coarsening will be made in all three directions:

> OBJ,    NAME,        B1
> OBJ,    POSITION,    0.468750E+00, 0.468750E+00, 0.468750E+00
> OBJ,    SIZE,        6.250000E-02, 6.250000E-02, 6.250000E-02
> OBJ,    GEOMETRY,    fine
> OBJ,    ROTATION24,        1
> OBJ,    TYPE,        FINE_GRID_VOL
> OBJ,    LEVELS,       0.000000E+00, 0.000000E+00, 0.000000E+00
> OBJ,    AXES,        OXYZ

The next lines of Q1 creates object B2, which will cause of grid coarsening inside the object on the second level. Coarsening will be made on the all three directions:

> OBJ,    NAME,        B2
> OBJ,    POSITION,    0.468750E+00, 0.468750E+00, 0.468750E+00
> OBJ,    SIZE,        6.250000E-02, 6.250000E-02, 6.250000E-02
> OBJ,    GEOMETRY,    fine
> OBJ,    ROTATION24,        1
> OBJ,    TYPE,        FINE_GRID_VOL
> OBJ,    LEVELS,       1.000000E+00, 1.000000E+00, 1.000000E+00
> OBJ,    AXES,        IXYZ

Sometimes it is desirable that the FGE-object should not affected the structured grid. Then the user should add the line
> OBJ, GRID, NO
and the full specification of the object will be:

> OBJ,    NAME,        B2
> OBJ,    POSITION,    0.468750E+00, 0.468750E+00, 0.468750E+00
> OBJ,    SIZE,        6.250000E-02, 6.250000E-02, 6.250000E-02
> OBJ,    GEOMETRY,    fine
> OBJ,    ROTATION24,        1
> OBJ,    GRID,        NO
> OBJ,    TYPE,        FINE_GRID_VOL
> OBJ,    LEVELS,       1.000000E+00, 1.000000E+00, 1.000000E+00
> OBJ,    AXES,        IXYZ
 

The grid-generation process employs the utility uspgrid.exe, which uses as input files eardat and facetdat generated by satexe.exe. These files contain:

Automatic grid generation

See also this document.

Automatic grid generation is used in two modes. First mode is used for terrain objects which are set by xyz file (USPTER=T). Second mode is used for any other cases. Automatic grid generation uses the process of refinement; therefore, if UAUTO=T, the Q1 should specify a coarse-structured grid.

The refinement process splits cells into four equal cells in 2-dimensional and into eight in 3-dimensional tasks. The maximum level of refinement (UMXLEV) is achived at bounds of BLOCKAGE objects. User can specify levels of refinement near PLATE objects using parameter UWALEV and near INLET&OUTLET object via parameter UIOLEV. Besides user can specify the number of layers of finest grid near objects using parameter UNOLAY.

The utility uspgrid.exe generates files (in any mode):

Several new PIL variables are introduced for USP:

  1. USP, logical variable, for USP cases variable USP = T.
  2. USPDBG, logical variable, default USPDBG = F.
  3. UAUTO, logical variable, for automatic grid generation variable UAUTO = T, for manual mode UAUTO = F.
  4. USPTER, logical variable, for automaticgrid generation with terrain objects which set via xyz file USPTER = T, for other cases USPTER = F.
  5. UGTGRD, logical variable for automatic mode with USPTER=T only which indicates if =T that uspgrid.exe get grid from structured grid as coarser grid. If UGTGRD=F the coarser grid is calculated as uniform grid.
  6. UTCPLT, logical variable, default UTCPLT = T. If parameter UTCPLT=T then the USP will store outcomes in format Tecplot to file phi001.dat for ASCII format. All variables are stored in vertices of control volumes by default.
  7. USPVTK, logical variable, default USPVTK = T. If parameter USPVTK=T then the USP will store outcomes in format VTK to file phi001.vtk for ASCII format. All variables are stored in vertices of control volumes by default.
  8. USPIMB, logical variable, default USPIMB = F. If parameter USPIMB=T then the imbalances for all solved variables will be calculated and printed-out in file result. (Comment. Only mass balance is implemented now).
  9. USCANX, USCANY, USCANZ, logical variables, which are used at UAUTO = T and USPTER=F only. If variable=T then it allows scanning for detection of objects in indicated direction at automatic grid generation process.
  10. MXLEV, MYLEV, MZLEV, integer variables, which denote the maximum level of coarsening in each direction. If all MXLEV=MYLEV=MZLEV=0 then coarsening does not allow and FGE-objects don't give any effect on grid generation. Theses parameters should be set if UAUTO=F.
  11. DOMAT, integer variable, PRPS for domain material.
  12. CELLST, FACEST, integer variables, the step over cells and faces for print-out into result file.
  13. MINPRP, MAXPRP, integer variables, these parameters indicates that the outcomes in Tecplot format will be stored for this interval only.
  14. UMXLEV, integer variable, the maximum level of refinement at automatic grid generation (UAUTO=T).
  15. UMXCLS, integer variable, the maximum cells in refinement process at automatic grid generation for terrain objects (UAUTO=T and USPTER=T).
  16. UNOLAY, integer variable, the number of layers of finest grid near the BLOCKAGE objects at automatic grid generation (UAUTO=T and USPTER=F).
  17. UIOLEV, integer variable, the maximum level of refinement near the INLET&OUTLET objects at automatic grid generation (UAUTO=T and USPTER=F).
  18. UWALEV, integer variable, the maximum level of refinement near the PLATE objects at automatic grid generation (UAUTO=T and USPTER=F).
  19. UMXCRS, integer variable, the maximum number of crosses of objects bounds at automatic grid generation (UAUTO=T and USPTER=F). Default value is 16.
  20. UGRITR, integer variable, the number of iteration at calculation of gradients of PHI-variables.
  21. USPREL, real parameter, it is hidden relaxation factor for hydrodynamics task. By default USPREL=0.7. But sometimes convergence will better for interval of USPREL from 0.4 to 0.75.
  22. UDVREL, real parameter, it allows to use linear relaxation for DUDP,DVDP,DWDP.
  23. UMNCEL, real variable for automatic mode with terrain objects only which set minimum size of cells at automatic grid generation process (UAUTO=T and USPTER=T).

Besides USP uses some relaxation parameters as old variables RSG11 and RSG12:

Note, parameters UCOARS and GETPRP are removed now. Use of these parameters will create an error.

PRPS is stored for USP always therefore the user need not set the PIL commands
NAME(140)='PRPS' and
STORE(PRPS)

USP INFORM

InForm statements

User can to use next kinds of statements in USP:

  1. initialisation of field, for example
    INITIAL of Var is Formula [with Options])
  2. calculation of properties, for example
    (PROPERTY of PropVar is Formula [with Options])
  3. to set sources terms, for example
    (SOURCE of Var at ObjName is Formula [with Options])
  4. calculation of stored fields, for example (STORED of Var is Formula [with Options])

Statements INFOB will be implemented in the nearest future. It will be processed by grid generation utility uspgrid.exe
Statements MAKE and STORE1 isn't implemented yet but they will be implemented in future.

Notes:

1) During processing of statements PROPERTY, STORED and INITIAL the structures feature [at PatchName] is ignored. For choice of cells set it is necessary to use condition statements (see below).
2) It is necessary to use name of VR-object in statement SOURCE instead of name of patch linked to object. If there is usual patch then user should use name of this patch.

InForm options

Most of post-formula options can be used in USP InForm:
1) Statements IMAT > value, .... (where value is PRPS);
2) Statements !IF with set of logical conditions. Conditions can contains any variables which is not connected with structured means.
For example, variable XG,YG,ZG (coordinates of cell centers) can be used, but it is not allowed to use structured indices IX,IY,IZ, NX,NY,NZ.
3) To set places for calculation of STORED variables the next option can be used as usual:
SWPSTR - at start of sweep (default),
SWPFIN - at end of sweep,
TSTSTR - at start of timestep,
TSTFIN - at end of timestep,
options ZSLFIN, ZSLSTR are the same as SWPSTR, SWPFIN.
4) At setting of SOURCE the next options can be used:
FIXFLU (by default) - fixed source,
FIXV - fixed value,
ONLYMS - value convected in by associated mass source,
VOLU - formula set source on the unit of volume.

Formulas

At the writing of formulas user can write the same statements, variables and functions as for SP. But there is single restriction: it is not allowed to use any elements which can be connected with structured grid.

For example, it is not allowed to use structured indexes:
IX, IY,IZ, NX, NY, NZ
fixed indexes- [];
fixed coordinates- {};
variables XU, YV, ZW;
next functions - SUM, SSUM, NORTH, SOUTH, EAST, WEST, HIGHT, LOW, ARR,AECO, ANCO, AHCO, AWCO, ASCO, ALCO,POS, VEL, ACC, MOFOR,EBOU, WBOU, NBOU, SBOU, LBOU, HBOU, ALL,FACET.

Samples of statements:

(SOURCE of TEM1 at MAT_2 is COVAL(:AlfVol:,10)!VOLU!IF(YG.GE.0.045))
(SOURCE of P1 at HOTIN is COVAL(FIXFLU,150)!VOLU)

(INITIAL of TEM1 is 66*MAX(EXP(YG),EXP(XG)) with IMAT=120)

RRR=SQRT(XG^2+YG^2)
(STORED VAR V1TH IS :AA:*:RRR: + BB/:RRR: WITH IMAT>100)

To run any case from the USP input-file library, users can copy script usp_run.bat to any suitable directory, select the case number and run this script with that number. For example, line
USP_run.bat 001
will run case 1 from inplib.
Please make sure that the case number has three digits.

Another way to see results obtained by USP is to activate the PHOENICS Commander, Section "Ready-to-run", then "Special features", then "USP".

Input file library

Description of cases (in \phoenics\d_earth\d_opt\d_usp\inplib).
  1. U001 - case with calculation of temperature field in body with vacuum cavity. Case does not contain divided grid.
  2. U002 - analog of standard case 100 with divided grid near the sources.
  3. U003 - case for calculation of temperature with divided grid to 4th level of refinement. The user can change distribution of conductivity.
  4. U004 - 2D heat conduction with space dependent source Case does not contain divided grid.
  5. U005 - transient 2D heat conductivity with sources Case does not contain divided grid.
  6. U006 - steady hydrodynamics flow in porous media
  7. U007 - steady 2D hydrodynamics flow in labyrinth without divided grid Structured PHOENICS requires significant more time to solve this sample.
  8. U008 - steady 2D hydrodynamics flow in labyrinth with divided grid but grid is the same as in case usp_6 Structured PHOENICS requires significant more time to solve this sample.
  9. U009 - steady 2D hydrodynamics flow in labyrinth with conjugate heat transfer and various materials of solid bodies.
  10. U010 - steady 2D hydrodynamics flow in plane channel for comparison with exact Poiseuille's law. (Comment. During last tests the divergence of sweeps have found for this case. It requires detailed investigation. Therefore this case is not presented in root directory of USP inplib)
  11. U011 - steady 2D hydrodynamics flow in plane channel with non-uniformly viscosity which is specified by patches. (Comment. During last tests the divergence of sweeps have found for this case. It requires detailed investigation. Therefore this case is not presented in root directory of USP inplib)
  12. U012 - 2D potential flow, this case is similar to 115 of core inplib.
  13. U013 - 2D potential flow, this case is similar to 116 of core inplib.
  14. U014 - 2D flow in duct with several components with diffusion, this case is similar to 121 of core inplib.
  15. U015 - 2D flow in duct with conjugate heat transfer using enthalpy.
  16. U016 - distribution of temperature on the divided grid in uniform flow. Note, if you want to see outcomes using Tecplot then you will see mistakes of Tecplot's interpolation. The WinPhoton gives correct picture because it uses interpolated values from file phi.
  17. U017 - hydrodynamics flow over step with divided grid.
  18. U018 - hydrodynamics flow in cavity with divided grid.
  19. U019 - turbulent flow over step with divided grid. Standard K-E model of turbulence is used. At present (11.07.08) the some bugs is known, for example, there is mistake in source code which arise divergence of sweeps in the case. This bug will be fixed in future.
  20. U020 - laminar flow around large cylinder on the coarse grid without divided cells. Cylinder is set as BLOCKAGE VR-object. USP run faster than SP on this sample.
  21. U021 - laminar flow around large cylinder on the fine grid without divided cells. Cylinder is set as BLOCKAGE VR-object.
  22. U022 - laminar flow around car.
  23. U023 - laminar flow around small cylinder.
  24. U024 - laminar flow around object which set as InForm object.
  25. U025 - laminar flow around small cylinder with divided grid.
  26. U026 - laminar flow around small sphere with divided grid.
  27. U027 - laminar flow around pyramid as terrain object.
  28. U028 - laminar flow around two cylinders with divided grid.
  29. U029 - turbulent flow near the wall. Effective viscosity model.
  30. U030 - turbulent flow in pipe. Effective viscosity model. Automatic and manual methods of grid generation.
  31. U031 - turbulent flow around of building. K-E model.
  32. U032 - laminar flow in T channel.
  33. U033 - turbulent flow around of pyramid. K-E model.
  34. U501 - solid-stress case. 2D xy one-material plate in tension.
  35. U502 - solid-stress case. 2D xy Hot Bi-metallic plate.
  36. U503 - solid-stress case. 2D Plate in tension with FY=var
  37. U504 - solid-stress case. A rectangular plate with a centrally-placed CIRCULAR hole.
  38. U505 - solid-stress case. 2D xy Plate with square hole.
  39. U506 - solid-stress case. Cooled long cylinder.
  40. U507 - solid-stress case. Pressurised long cylinder.
  41. U508 - solid-stress case. Stress in a 2D rotating disk.
  42. U550 - solid-stress case with hydrodynamics flow. 3D Thermal Stress In BLADE.
  43. U701 - heat conductivity in complex geometry. Automatic Grid Generation.
  44. U702 - laminar flow around small body. Automatic Grid Generation.
  45. U703 - heat conductivity in complex geometry. Automatic Grid Generation.
  46. U704 - heat conductivity in 3D burner. Automatic Grid Generation.
  47. U705 - turbulent flow around of building. Model effective viscosity. Automatic Grid Generation.
  48. U706 - turbulent flow around of building. K-E model . Automatic Grid Generation.
  49. U707 - heat conductivity into in complex Body. Automatic Grid Generation.
  50. U708 - laminar flow into complex body. Automatic Grid Generation.
  51. U709 - laminar flow in Faucet for mixing hot and cold water. Automatic Grid Generation.
  52. U710 - laminar flow in Turn-around duct. Automatic Grid Generation.
  53. U711 - laminar flow around 2D Cylinder. Automatic Grid Generation.

Possibilities of USP