Results 1 to 2 of 2

Thread: Using multiple solution methods

  1. #1
    Unregistered
    Guest

    Using multiple solution methods

    Is it possible to say use ISOLVE =1 for 32x32 and save the solution for 128x128 grid (the 0:np1,0:np2 ) and restart with ISOLVE = 3 for 128x128 and proceed with timesteps? I briefly looked into whats written in pde2d.res and it is clearly different for different methods. Can the array ures8z be used for this purpose?

  2. #2
    If you set RESTRT=.TRUE. and GRIDID=.TRUE., the solution is dumped at the nodes into the restart file 'pde2d.res', and then read back in the next run, so it is essential that the FEM grid (NXGRID,NYGRID or NP1GRID,NP2GRID) not change between the dumping and restarting program. (In fact, even if you use the same grid, and a different ISOLVE, you will get an error message, because different solvers may number the nodes differently.)

    However, you can restart with a different grid and/or different ISOLVE if you just set GRIDID=.FALSE., then the solution is dumped on a NXP8Z by NYP8Z regular grid and read back in and interpolated to the new nodes. Thus there will be some loss of accuracy due to the interpolation, if GRIDID=.FALSE., but otherwise the result is the same as if GRIDID=.TRUE. You can control the size of the restart grid (NXP8Z by NYP8Z for 2D problems) and the interpolation degree (KDEG8Z), so you may want to increase these from their default values.

    It is important in this discussion to understand that there are three completely independent "grids" used by PDE2D, for different purposes:

    1. There is the FEM grid (triangles for 2D Galerkin method, otherwise a rectangular grid (not necessarily uniform)), of size (for 2D problems): NXGRID by NYGRID (or NP1GRID by NP2GRID). This determines the accuracy and amount of CPU time expected.

    2. There is the output grid, always a regular rectangular grid (NX by NY or NP1 by NP2 for 2D problems), which is used to save the solution, for postprocessing (plotting, MATLAB postprocessing...).

    3. There is the restart grid, always a regular rectangular grid (NXP8Z by NYP8Z for 2D problems), which is used only for dumping by one run and restarting, with interpolation, from another run, in the case GRIDID=.FALSE. The user normally doesn't touch this grid in any way, except he can set the size of the grid by setting NXP8Z,NYP8Z, but only very rarely will you have any need to modify or do anything with this grid, the dump and restart is all handled completely automatically.

    In summary, I believe you can do exactly what you propose, by setting RESTRT=.TRUE. but GRIDID=.FALSE., then simply run the steady-state program (with ISOLVE=1; but make sure there is no 'pde2d.res' file in your working directory already) and the solution will be dumped into file 'pde2d.res' on an NXP8Z by NYP8Z grid, and then run your time-dependent program (with ISOLVE=3 and a different FEM grid), also with RESTRT=.TRUE and GRIDID=.FALSE. The restart will all be handled automatically, don't do anything with ures8z, though you might want to increase NXP8Z and NYP8Z if interpolation error is a concern.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •