[FLASH-USERS] MHD (8wave & USM): Refinement region boundaries - spurious waves when B field is oblique to jumps in refinement.

Jonathan Thurgood jonathan.thurgood at northumbria.ac.uk
Wed May 18 07:01:22 EDT 2016


Hi Klaus,

Thanks for the info!

I tried a naïve approach of just uncommenting the lines DWL had commented-out in mpi_amr_1blk_guardcell_c_to_f to call the balsara prologation at the jumps in refinement, but this didn't seem to do much for me.

I also tried changing NGUARD to 6 (and nxb, nyb to = 12), which basically just moves the artefact and changes its amplitude a bit, but has no real impact.

Given I've now tried most options (I think?) and it seems to be at least connected to the interpolation, I think it might be useful to go through the fine-to-coarse / coarse-to-fine interpolation at the boundaries "by hand" for a few B-field geometries and check that this is working okay (specifically, when field is oblique to the cells). 

The artefact is common to 8 wave and USM, so I think it is sensible to start with going through the interpolation at boundaries used in the 8 wave setup since I won't have to worry about the staggering on face variables.

Could you please tell me which files / routines would be called to handle the coarse-to-fine / fine-to-coarse interpolation at refinement boundaries in the case of a simple 8wave setup so I can follow them through? The code is so substantial that I'm finding it tricky to navigate the source code at this stage.

Best regards,

Jonathan






-----Original Message-----
From: Klaus Weide [mailto:klaus at flash.uchicago.edu] 
Sent: 12 May 2016 18:59
To: Jonathan Thurgood
Cc: Sean Couch; John ZuHone; flash-users at flash.uchicago.edu
Subject: Re: [FLASH-USERS] MHD (8wave & USM): Refinement region boundaries - spurious waves when B field is oblique to jumps in refinement.

On Thu, 12 May 2016, Jonathan Thurgood wrote:

> 2)      Changing the prol_method.
> 
> This makes no difference as far as I can tell (not even a slight change in the current amplitudes). I wondered if that in of itself was not strange?
> 
> Is it possible that the that special prolongation is only being 
> applied when a block is refined to a lower level, but not when blocks 
> of different levels of refinement compute guard cell data, but rather 
> only some simple interpolation?

Hi Jonathan,

Your suspicion is correct that face variable interpolation may use different methods between the two situations:
 (a) filling cells (here: cell faces) that have been newly created with data;
 (b) computing values for guard cell faces at refinement boundaries.
in particular, the runtime parameter 'prol_method' appears to affect only case (a).

This can be seen in the code:
 * Case (a) involves routine amr_prolong(mpi_amr_prolong.F90); the code 
   path for handling "BALSARA" prolongation looks like this:

   If ( prol_fc_dbz) Then
     .....
     Call amr_1blk_fc_prol_dbz(.....)
   .....

 * Case (b) involves routine mpi_amr_1blk_guardcell_c_to_f. Here, the 
   corresponding calls to amr_1blk_fc_prol_dbz() are commented out.
   (See also 1-line comments in that file if your are curious.)

I can't speak about reasons for this different treatment, but it is no doubt based on experience (not mine) with applications.



> I did wonder if it might be worth changing NGUARD (thus, how many 
> cells the coarse side of the boundary needs to be interpolated into) 
> but for the life of me I couldn’t figure out where you actually change 
> this in the code (is it a setup argument? Flash.par didn’t seem to accept it).
> Can someone please let me know how to do this?

NGUARD can be changed by putting a line like

  GUARDCELLS 6

in a Config file. Note that the file

  source/physics/Hydro/HydroMain/unsplit/Config

already contains such a line, and you have to avoid putting a conflicting line in your own Config. See the following close to the end of that Config:

  # Number of guard cells at each boundary
  USESETUPVARS SupportPpmUpwind
  IF SupportPpmUpwind
     GUARDCELLS 6 # the Unsplit Hydro/MHD solver requires 6 guard cells to support PPM Upwind!
  ELSE
     GUARDCELLS 4 # the Unsplit Hydro/MHD solver requires 4 guard cell layers!
  ENDIF

So to get 6 instead of 4 leayers of guard cells (and also enable the upwind variant of PPM), add SupportPpmUpwind=True to your setup command.

Klaus


More information about the flash-users mailing list