It is accordingly provided with the following hyperlinks to the corresponding sections:
In the present case it is reasonable to consider three non-dimensional quantities, namely:
Of the computed distributions of these quantities, we can reasonably expect:
[One might suppose (wrongly as it will turn out) that -1.0 must be the lowest possible value, arguing that this would be a consequence of the Bernoulli equation if the duct were frictionless and the outlet area very great. We shall see.]
Place there the q1 you already used in your previous runs.
We are now going to create a proper data file for subsequent runs based on the gp25_1 file. So copy this file into your new directory with help of the Commander editor.
However, if you do not want to repeat all these steps, you can copy the data file gp25_3 from the folder phoenics/d_polis/d_tuts/pq1ts/pq1t2_2 into your present working directory.
The non-dimensional variables described above are computed by PHOENICS, if the following changes are introduced into the appropriate places in the gp25_1 file of your new working directory, which file we now rename to gp25_3.
We shall repeat here all necessary statements to enable the use of copy and paste commands, thus avoiding any possible error.
real(real(invel,inmass,intem,pext,inarea,heatflux) intem=20.0 pext=0.0 heatflux=100. invel=0.05 inarea=yvlast*0.45*zwlast inmass=inarea*rho1*invel inarea inmassThese are inlet temperature, velocity, cross-sectional area; and mass-flow rate, heat input and external pressure.
store(vabs) (stored var nd_v is vabs/:invel:) (stored var nd_p is (p1-:pext:)/(.5*:rho1:*:invel:^2)) (stored var nd_t is (tem1-:intem:)*:cp1:*:inmass:/:heatflux:) mesg(variables stored) storedIt is in this section that the formulae for non-dimensional variables explained earlier are introduced.
> OBJ, NAME, L-BLOCK > OBJ, HEAT_FLUX, 0.000000E+00, heatflux
> OBJ, TYPE, INLET > OBJ, PRESSURE, 0.000000E+00 > OBJ, VELOCITY, invel, 0.000000E+00, 0.000000E+00 > OBJ, TEMPERATURE, intemfor which the values of velocity and temperature are replaced by the corresponding parameters, and
> OBJ, TYPE, OUTLET > OBJ, PRESSURE, pext
is largest at the inlet, and smallest in gaps where the flow velocity is high as has been expected.
Its minimum value is about -2.9 in the gap between the H-BLOCK and the IN-BLOCK.
This is contrary to the above supposition that -1.0 is its lowest possible value. Is the supposition wrong? Or is the grid too coarse for accuracy?
The studies to be made in section 4 will throw light on these questions.
is close to zero the upper part of the labyrinth, which is farther from the heated L-BLOCK.
As has been expected, it is around unity at the outlet, although its average value cannot be deduced by eye.
Although its values must exist there, they are not displayed.
[The reason is that the Viewer has been programmed to display in solid regions only a few pre-specified variables, namely temperature, PRPS and stresses and strains].
The contours of dimensional temperature below:
show that within the solids L-BLOCK and IN-BLOCK the temperature is practically uniform. This is to be explained by the high conductivities of the materials of which they are made, namely copper and aluminium.
It should be remarked that, because the default "averaged" contour option has been used for creation of the above picture, low temperatures do appear to penetrate into the block.
If however the option is switched off, as is shown in the Viewer Options window accessed by clicking on the variable button ,
Were the IN-BLOCK to be made of glass, for example, with a conductivity of 0.002 times that of copper, the temperature distribution would be quite different: the heated lower block (L-BLOCK) would remain hot, but the upper parts of IN-BLOCK would be cooler, as is shown (with 'averaged' re-selected) here:
This result can be achieved by replacing the following line in the data file
> OBJ, MATERIAL, 103,COPPER at 27 deg Cby
> OBJ, MATERIAL, 106,GLASS
and making a new run.
[The remainder of the tutorial, however, will concern the IN-BLOCK made of copper; so do not forget to restore the previous material setting in the data file gp25_3 before proceeding.]
The results of the simulation have coincided, more or less, with our expectations; but a doubt has been raised as to whether an unexpectedly low nd_p was the effect of grid coarseness.
It is wise therefore to explore the extent which the result depends upon the fineness of the grid; this will now be done.
Groups 3, 4, 5 Grid Information * Overall number of cells, RSET(M,NX,NY,NZ,tolerance) RSET(M,20,1,15)together with the fact, that no instruction to the contrary having been given, the grid should fit the objects within the default tolerance.
We shall now inspect that grid and examine the decisions which the Satellite made. Thereafter we shall consider how we can over-rule these decisions by setting parameters.
However, it might be easier to examine the grid if the following procedures are made.
The IN-PLATE being of zero thickness has disappeared and now only the IN-BLOCK and the grid are visible.
The grid is uniformly distributed in the x-direction, but not quite so in the z-direction, as is confirmed by inspecting what is printed by the Satellite in the file q1ear (and later by EARTH in RESULT), namely:
Group 3. X-Direction Grid Spacing CARTES = T NX = 20 XULAST = 2.000000E+00 XFRAC ( 1) = 5.000000E-02 ;XFRAC ( 2) = 1.000000E-01 XFRAC ( 3) = 1.500000E-01 ;XFRAC ( 4) = 2.000000E-01 XFRAC ( 5) = 2.500000E-01 ;XFRAC ( 6) = 3.000000E-01 XFRAC ( 7) = 3.500000E-01 ;XFRAC ( 8) = 4.000000E-01 XFRAC ( 9) = 4.500000E-01 ;XFRAC ( 10) = 5.000000E-01 XFRAC ( 11) = 5.500000E-01 ;XFRAC ( 12) = 6.000000E-01 XFRAC ( 13) = 6.500000E-01 ;XFRAC ( 14) = 7.000000E-01 XFRAC ( 15) = 7.500000E-01 ;XFRAC ( 16) = 8.000000E-01 XFRAC ( 17) = 8.500000E-01 ;XFRAC ( 18) = 9.000000E-01 XFRAC ( 19) = 9.500000E-01 ;XFRAC ( 20) = 1.000000E+00 ************************************************************ Group 5. Z-Direction Grid Spacing PARAB = F NZ = 15 ZWLAST = 1.000000E+00 ZFRAC ( 1) = 5.000000E-02 ;ZFRAC ( 2) = 1.125000E-01 ZFRAC ( 3) = 1.750000E-01 ;ZFRAC ( 4) = 2.375000E-01 ZFRAC ( 5) = 3.000000E-01 ;ZFRAC ( 6) = 3.666667E-01 ZFRAC ( 7) = 4.333333E-01 ;ZFRAC ( 8) = 5.000000E-01 ZFRAC ( 9) = 5.666667E-01 ;ZFRAC ( 10) = 6.333333E-01 ZFRAC ( 11) = 7.000000E-01 ;ZFRAC ( 12) = 7.833333E-01 ZFRAC ( 13) = 8.666667E-01 ;ZFRAC ( 14) = 9.500000E-01 ZFRAC ( 15) = 1.000000E+00The uniformity in the x-direction is a consequence of the fact that all the x-direction positions and sizes of the objects happen to be multiples of 0.05 m; therefore all the xfrac values are such multiples also. But this accidental congruence did not occur with respect to the z-direction settings.
If you desire to know what the grid would have been like had it not been adjusted to fit the objects, paste the line:
> obj, grid, nobeneath each object-related block of settings in file gp25_3; then run the VR Editor. The grid will then appear as follows:
In this case you should beware of either clicking on File and Quit to exit the VR Editor without saving all the changes made, or clearing the boxes in the 'Save Current Settings' window each time when you close the VR Editor clicking on the top-right cross.
Only then will:
Indeed, if it is recognised that the INLET, OUTLET and IN-PLATE objects are not visible in this view, it may be concluded that all of the red lines do coincide with object boundaries.
In order to confirm this, remove or deactivate the 'grid, no' lines from gp25_3, re-run the VR-Editor, then click first on the 'Mesh toggle' button and then on the 'Geometry cells toggle' button . The image which you will see is as follows:
This shows all the cells which are within objects of volumetric type or adjacent to objects of cell-face type; and the red lines do run along the boundaries of each such group of cells.
Thus is revealed how the PHOENICS Satellite fits its grid to the objects: it divides each of the x, y and z dimensions into a sufficient number of so-called 'regions' to enable their boundaries to fit the objects, and then distributes the remaining grid lines as evenly as possible between them.
In the present case there are four regions in the x-direction and six in the z-direction, facts which are confirmed by the following lines in the gp25_3 file:
> GRID, RSET_X_1, 5, 1.000000E+00 > GRID, RSET_X_2, 5, 1.000000E+00 > GRID, RSET_X_3, 4, 1.000000E+00 > GRID, RSET_X_4, 6, 1.000000E+00 > GRID, RSET_Y_1, 1, 1.000000E+00 > GRID, RSET_Z_1, 1, 1.000000E+00 > GRID, RSET_Z_2, 4, 1.000000E+00 > GRID, RSET_Z_3, 3, 1.000000E+00 > GRID, RSET_Z_4, 3, 1.000000E+00 > GRID, RSET_Z_5, 3, 1.000000E+00 > GRID, RSET_Z_6, 1, 1.000000E+00Here:
It is its candour in doing so which allows us to take command.
> GRID, RSET_X_1, 10, 1.000000E+00 > GRID, RSET_X_2, 10, 1.000000E+00 > GRID, RSET_X_3, 8, 1.000000E+00 > GRID, RSET_X_4, 12, 1.000000E+00 > GRID, RSET_Y_1, 1, 1.000000E+00 > GRID, RSET_Z_1, 2, 1.000000E+00 > GRID, RSET_Z_2, 8, 1.000000E+00 > GRID, RSET_Z_3, 6, 1.000000E+00 > GRID, RSET_Z_4, 6, 1.000000E+00 > GRID, RSET_Z_5, 6, 1.000000E+00 > GRID, RSET_Z_6, 2, 1.000000E+00which implies that we have doubled the number of cells in each x-direction and z-direction region.
When we re-run the VR-Editor, the grid will appear thus:
The pressure contours and velocity vectors, when the Earth solver has been run, will appear in the Viewer thus:
Let us see how this mere increase in the cell number has changed the non-dimensional pressure and temperature. Whether these complexes have been changed to approach our expectations expressed in the previous part of the tutorial.
The non-dimensional pressure now looks like in this picture.
Judging by the scale we could think that the results are now even less understandable than for the previous run as the minimum value is now approaching -7. However, the region where the non-dimensional pressure is negative, i.e. in the above IN-BLOCK space has become smaller. As to the outlet area, it is practically zero.
As to the non-dimensional temperature, it is as in the following picture.
It is practically zero in the major space of the labyrinth increasing with approach to the heat source (L-BLOCK) and behind the IN-BLOCK as in the previous run. In general, the non-dimensional temperature is becoming more uniform as the heat input from the L-BLOCK is rather small and the air inlet velocity is small too.
Evidently, the grid has been refined, as is reflected in the result file thus:
even though the command describing the grid in q1, namely:
Groups 3, 4, 5 Grid Information * Overall number of cells, RSET(M,NX,NY,NZ,tolerance) RSET(M,20,1,15)remained unchanged.
> GRID, RSET_X_1, 10, 0.5 ! power law starting from low x > GRID, RSET_X_2, 10, -0.5 ! power law starting from high x > GRID, RSET_X_3, -8, 2.0 ! symmetrical power law > GRID, RSET_X_4, -12, 2.0,g ! symmetrical geometric progressionDisplayed in the VR-Editor, with the Mesh and Wireframe toggles pressed, the grid now appears as:
The pressure distribution and contours which result when the solver is run with this grid is shown here:
As to the non-dimensional pressure, it will be like this one:
Although the minimum non-dimensional pressure has been reduced a little bit more as compared with the previous run, the area of negative non-dimensional pressure has been also reduced and in the space between the IN-BLOCK and the OUTLET section this parameter is stably positive. We can attribute the increase of the absolute value of the minimum pressure to the round-off error.
The non-dimensional temperature looks like in the picture which follows.
It is uniform enough except for the areas behind the WALL-W and the IN-BLOCK where its maximum values are found, but these can be also explained by flow stagnation in these zones.
Declaring grid parameters integer(nx1,nx2,nx3,nx4,nz1,nz2,nz3,nz4,nz5,nz6) real (px1,px2,px3,px4,pz1,pz2,pz3,pz4,pz5,pz6) char (gx1,gx2,gx3,gx4,gz1,gz2,gz3,gz4,gz5,gz6) Setting grid parameters nx1=10; nx2=10; nx3=-8; nx4=-12 nz1=2; nz2=8; nz3=6; nz4=6; nz5=6; nz6=2 px1=0.5; px2=-0.5; px3=2.0; px4=2.0 pz1=1.0; pz2= 1.0; pz3=1.0; pz4=1.0; pz5=1.0; pz6=1.0 gx1=f; gx2=f; gx3=f; gx4=t gz1=f; gz2=f; gz3=f; gz4=f; gz5=f; gz6=f Reading grid parameters > GRID, RSET_X_1, nx1, px1, gx1 > GRID, RSET_X_2, nx2, px2, gx2 > GRID, RSET_X_3, nx3, px3, gx3 > GRID, RSET_X_4, nx4, px4, gx4 > GRID, RSET_Y_1, 1, 1.0, f > GRID, RSET_Z_1, nz1, pz1, gz1 > GRID, RSET_Z_2, nz2, pz2, gz2 > GRID, RSET_Z_3, nz3, pz3, gz3 > GRID, RSET_Z_4, nz4, pz4, gz4 > GRID, RSET_Z_5, nz5, pz5, gz5 > GRID, RSET_Z_6, nz6, pz6, gz6If this is done, and a further run made, the results will be precisely as before (if indeed your last run did have the grid settings implied above).
The influences of these parameters can now be explored one by one. For example, it may be interesting to see what is the effect of switching between the power-law and geometric progression options, or to experiment with the minus sign placed before that number of intervals or the p-attribute.
More important however is to discover how many intervals are needed for the numerical solution to be accurate.
That is the subject of section 4 of this tutorial, in preparation for which you should introduce the following few extra lines just above the 'reading grid parameters' section:
Further declarations integer(nx0,nz0) Further settings nx0= 1; nz0=nx0 nx1=nx1*nx0; nx2=nx2*nx0; nx3=nx3*nx0; nx4=nx4*nx0 nz1=nz1*nz0; nz2=nz2*nz0; nz3=nz3*nz0; nz4=nz4*nz0; nz5=nz5*nz0; nz6=nz6*nz0By introducing the two additional parameters, nx0 and nz0, making the first equal the second and linking the other nx's and nz's to them, we have thus made it possible quickly to change the fineness of the whole grid, without losing the ability subsequently to make further refinements in individual regions of the grid.
The nature and rationale of these actions will become clearer if some of the entries made in the file gp25_3 are tranfserred to another file which we shall call params. This will be related to q1 and gp25_3 as indicated in the following sketch:
You should therefore now paste into your Q1 the last three lines of the following, so that it contains:
Groups 3, 4, 5 Grid Information * Overall number of cells, RSET(M,NX,NY,NZ,tolerance) RSET(M,20,1,15) save3begin incl(params) save3endThe params file is being included at this point so that what it contains about the grid wil not be over-written, as it otherwise would be, by the RSET command which follows.
Now create the params file itself by pasting in the following lines, most of which have appeared before in the gp25_3 file:
params file for library case 621, used in parameterised q1 tutorial number 2 TEXT(parameterized 621 PIL-parameter settings ****************************************** xulast=2. yvlast=1. zwlast=1. non-PIL parameter declarations ********************************** object parameters real(invel,inmass) object-existence parameter boolean(inpxst,inbxst,wwxst,ewxst) parameters used in non-dimensional variables real(intem,pext,inarea,heatflux) grid-related parameters integer(nx1,nx2,nx3,nx4,ny1,nz1,nz2,nz3,nz4,nz5,nz6) real (px1,px2,px3,px4,py1,pz1,pz2,pz3,pz4,pz5,pz6) char(gx1,gx2,gx3,gx4,gy1,gz1,gz2,gz3,gz4,gz5,gz6) Further declarations integer(nx0,nz0) non-PIL parameter settings ************************************** object-existence parameters inpxst=t inbxst=t wwxst=t ewxst=t non-dimensional variables intem=20.0 pext=0.0 heatflux=100. invel=0.05 inarea=yvlast*0.45*zwlast inmass=inarea*rho1*invel Grid-related parameters nx1=10; nx2=10; nx3=-8; nx4=-12 ny1=1 nz1=2; nz2=8; nz3=6; nz4=6; nz5=6; nz6=2 px1=0.5; px2=-0.5; px3=2.0; px4=2.0; py1=1.0 pz1=1.0; pz2=1.0; pz3=1.0; pz4=1.0; pz5=1.0; pz6=1.0 gx1=; gx2=; gx3=; gx4=g; gy1= gz1=; gz2=; gz3=; gz4=; gz5=; gz6= Further settings nx0= 1; nz0=nx0 nx1=nx1*nx0; nx2=nx2*nx0; nx3=nx3*nx0; nx4=nx4*nx0 nz1=nz1*nz0; nz2=nz2*nz0; nz3=nz3*nz0; nz4=nz4*nz0; nz5=nz5*nz0; nz6=nz6*nz0Those lines which have not been seen before are printed in red. They provide for the possibility of removing from the scenario four of the objects: IN-PLATE, IN-BLOCK, WALL-W and WALL-E.
Finally we suggest that you edit the existing data file gp25_3 and save it as, for example, gp25_4, by cutting and pasting your gp25_3 in the following way:
GVIEW(P,0.000000E+00,-1.000000E+00,0.000000E+00) GVIEW(UP,0.000000E+00,0.000000E+00,1.000000E+00) store(vabs) (stored var nd_v is vabs/:invel:) (stored var nd_p is (p1-:pext:)/(.5*:rho1:*:invel:^2)) (stored var nd_t is (tem1-:intem:)*:cp1:*:inmass:/:heatflux:) mesg(variables stored) stored > DOM, SIZE, 2.000000E+00, 1.000000E+00, 1.000000E+00 > DOM, SIZE, xulast, yvlast, zwlast > DOM, MONIT, 7.500000E-01, 5.000000E-01, 4.666670E-01 > DOM, MONIT, .75*zwlast, .5*zwlast, .466667*zwlast > DOM, SCALE, 1.000000E+00, 1.000000E+00, 1.000000E+00 > DOM, SNAPSIZE, 1.000000E-02 Reading grid parameters > GRID, RSET_X_1, nx1, px1, gx1 > GRID, RSET_X_2, nx2, px2, gx2 > GRID, RSET_X_3, nx3, px3, gx3 > GRID, RSET_X_4, nx4, px4, :gx4: > GRID, RSET_Y_1, ny1, py1, gy1 > GRID, RSET_Z_1, nz1, pz1, gz1 > GRID, RSET_Z_2, nz2, pz2, gz2 > GRID, RSET_Z_3, nz3, pz3, gz3 > GRID, RSET_Z_4, nz4, pz4, gz4 > GRID, RSET_Z_5, nz5, pz5, gz5 > GRID, RSET_Z_6, nz6, pz6, gz6 > OBJ, NAME, H-BLOCK > OBJ, POSITION, 0.000000E+00, 0.000000E+00, 9.500000E-01 > OBJ, POSITION, .0, .0, .95*zwlast > OBJ, SIZE, 2.000000E+00, 1.000000E+00, 5.000000E-02 > OBJ, SIZE, xulast, yvlast, .05*zwlast > OBJ, GEOMETRY, cube14 > OBJ, ROTATION24, 1 > OBJ, TYPE, BLOCKAGE > OBJ, MATERIAL, 100,ALUMINIUM at 27 deg c > OBJ, grid, no > OBJ, NAME, L-BLOCK > OBJ, POSITION, 0.000000E+00, 0.000000E+00, 0.000000E+00 > OBJ, POSITION, 0., 0., 0. > OBJ, SIZE, 2.000000E+00, 1.000000E+00, 5.000000E-02 > OBJ, SIZE, xulast, yvlast, .05*zwlast > OBJ, GEOMETRY, cube4 > OBJ, ROTATION24, 1 > OBJ, TYPE, BLOCKAGE > OBJ, MATERIAL, 100,ALUMINIUM at 27 deg c > OBJ, HEAT_FLUX, 0.000000E+00, heatflux > OBJ, grid, no if(ewxst) then > OBJ, NAME, WALL-E > OBJ, POSITION, 2.000000E+00, 0.000000E+00, 5.000000E-01 > OBJ, POSITION, xulast, .0, .5*zwlast > OBJ, SIZE, 0.000000E+00, 1.000000E+00, 5.000000E-01 > OBJ, SIZE, .0, yvlast, .5*zwlast > OBJ, GEOMETRY, cube11 > OBJ, ROTATION24, 1 > OBJ, TYPE, PLATE > OBJ, grid, no endif if(wwxst) then > OBJ, NAME, WALL-W > OBJ, POSITION, 0.000000E+00, 0.000000E+00, 0.000000E+00 > OBJ, POSITION, .0, .0, .0 > OBJ, SIZE, 0.000000E+00, 1.000000E+00, 5.000000E-01 > OBJ, SIZE, .0, yvlast, .5*zwlast > OBJ, GEOMETRY, cube11 > OBJ, ROTATION24, 1 > OBJ, TYPE, PLATE > OBJ, grid, no endif if(inpxst) then > OBJ, NAME, IN-PLATE > OBJ, POSITION, 5.000000E-01, 0.000000E+00, 3.000000E-01 > OBJ, POSITION, .25*xulast, 0., .3*zwlast > OBJ, SIZE, 0.000000E+00, 1.000000E+00, 6.500000E-01 > OBJ, SIZE, .0, yvlast, .65*zwlast > OBJ, GEOMETRY, cube11 > OBJ, ROTATION24, 1 > OBJ, TYPE, PLATE > OBJ, POROSITY, 0.000000E+00 > OBJ, SIDE, BOTH > OBJ, grid, no endif if(inbxst) then > OBJ, NAME, IN-BLOCK > OBJ, POSITION, 1.000000E+00, 0.000000E+00, 5.000000E-02 > OBJ, POSITION, .5*xulast, .0, .05*zwlast > OBJ, SIZE, 4.000000E-01, 1.000000E+00, 6.500000E-01 > OBJ, SIZE, .2*xulast, yvlast, .65*zwlast > OBJ, GEOMETRY, cube14 > OBJ, ROTATION24, 1 > OBJ, TYPE, BLOCKAGE > OBJ, MATERIAL, 103,COPPER at 27 deg C > OBJ, MATERIAL, 111, STEEL > OBJ, MATERIAL, 106, GLASS > OBJ, grid, no endif > OBJ, NAME, INLET > OBJ, POSITION, 0.000000E+00, 0.000000E+00, 5.000000E-01 > OBJ, POSITION, .0, .0, .5*zwlast > OBJ, SIZE, 0.000000E+00, 1.000000E+00, 4.500000E-01 > OBJ, SIZE, .0, yvlast, .45*zwlast > OBJ, GEOMETRY, cube3t > OBJ, ROTATION24, 1 > OBJ, TYPE, INLET > OBJ, PRESSURE, 0.000000E+00 > OBJ, VELOCITY, invel, 0.000000E+00, 0.000000E+00 > OBJ, TEMPERATURE, intem > OBJ, TURB-INTENS, 5.000000E+00 > OBJ, grid, no > OBJ, NAME, OUTLET > OBJ, POSITION, 2.000000E+00, 0.000000E+00, 5.000000E-02 > OBJ, POSITION, xulast, .0, .05*zwlast > OBJ, SIZE, 0.000000E+00, 1.000000E+00, 4.500000E-01 > OBJ, SIZE, .0, yvlast, .45*zwlast > OBJ, GEOMETRY, cube12t > OBJ, ROTATION24, 1 > OBJ, TYPE, OUTLET > OBJ, PRESSURE, pext > OBJ, TEMPERATURE, SAME > OBJ, COEFFICIENT, 1.000000E+03 > OBJ, TURBULENCE, SAME , SAME > OBJ, grid, noIn this, the only novelties introduced in the file and emphasized by red are if...endif pairs around the statements referring to the objects which may be removed from the scene.
To confirm that these work, now set to f (i.e. false) in the params file each of the logical parameters: inpxst, inbxst, wwxst, ewxst, wherein the xst stands for 'exists'; then introduce a proper file name into the include statement in the q1 incl(gp25_4) and make a run. You should then see something like this in respect of the pressure contours and velocity vectors:
The four excluded objects indeed no longer exist.
Having separated the declaration and setting of parameters from the lines which they influence, we can now confine attention to the file params, using this as the means whereby we explore the influence of grid fineness on accuracy.
If the answer is affirmative, it would be reasonable to call the calculations 'accurate'; however, accuracy of that kind is not what concerns us here, for two reasons, namely:
A numerical calculation is considered accurate if the quantities of practical interest which it computes are almost independent of the fineness and distribution of the computational grid.
In order to test it, one must:
For simplicity we shall make the grids uniform within each region; therefore the grid-related settings in the params file appear as:
pz1=1.0; pz2= 1.0; pz3=1.0; pz4=1.0; pz5=1.0; pz6=1.0 px1=1.; px2=1.; px3=1.0; px4=1.0 pz1=1.0; pz2= 1.0; pz3=1.0; pz4=1.0; pz5=1.0; pz6=1.0 gx1=f; gx2=f; gx3=f; gx4=t gz1=f; gz2=f; gz3=f; gz4=f; gz5=f; gz6=f Further settings nx0= 1; nz0=nx0Restore the object-existence parameter to 't'
inpxst=t inbxst=t wwxst=t ewxst=tand also type at the bottom of the q1 file:
#maxmin ! to print maximum and minimum values on the screen lsweep=1000 ! to ensure convergence debug=t ! to ensure that highest and lowest values are ! printed in the RESULT file STOPYou are invited now to perform runs with various values of nx0 of which the first will be with nx0= 1. If you do, you will probably obtain results such as are contained in the following table.
This shows that the grid should have 100 times as many cells (nx0=nz0=10) as has the coarsest grid (nx0=nz0=1) if the results of the computations are to be(almost) independent of the fineness of the grid.
If you performed any of these runs yourself, you will have observed that the computer time increased considerably (probably by a factor of 100 squared over the whole range!) as the grid becomes finer.
This is why users of CFD codes often content themselves with grids which are much coarser than those which would procure grid independence.
The influence of the parameters was explored only to a limited extent, in that:
You are therefore invited to explore their influence for yourself; and you are positively advised to parameterize any other Q1 files which you create, of which the numerical accuracy of the resulting computations is important to you, so as to be able to establish what degree of grid-independence you are achieving.
What fineness of grid you should then use will depend on the purposes for which you are making the simulation. If you seek only a qualitative idea of the nature of the flow, there will be no reason to incur the expense of using a fine grid.
Alternatively, if you are designing an important process or item of equipment, you will probably be wise to use the finest grid which the size of your computer permits, regarding the maximised accuracy as justifying the expense.
In this case you may find it useful to make use of the so-called SPINTO feature, described here. This allows the finest-grid solution to be achieved more quickly by re-starting from a succession of coarser-grid ones.
TURMOD(KECHEN)in Group 7 of the original Q1 file, which has not been changed in this respect; and
variables stored) > > P1 ( 1) U1 ( 3) W1 ( 7) KE ( 12) EP ( 13) > VABS( 147) ENUT( 148) EPKE( 149) TEM1( 150)which indicate that the variables:
The above lines indicate that a so-called 'turbulence model' has been used, and specifically the one with the name KECHEN.
These terms will not be explained here; however, Tutorial 3 in the parameterized-q1 series will devoted to explaining them, and to providing a systematic introduction to the important branch of Computational Fluid Dynamics which is known as Turbulence Modelling.