[FLASH-USERS] Problem with Grid_bcApplyToRegion.F90 file

Mordecai-Mark Mac Low mordecai at amnh.org
Fri Mar 23 07:27:19 EDT 2018


je is regionSize(SECOND_DIR), which is only 4 if you have an extremely narrow grid!  If you make your grid a reasonable size, then you can restrict the loop on je to
the jet injection region that you actually want.

Best,

Mordecai

On Mar 22, 2018, at 21:41, María Fernanda Clever Uribe <clever_fisica at ciencias.unam.mx<mailto:clever_fisica at ciencias.unam.mx>> wrote:

Hi,

I tried Klaus' recommendation about the j index but I still don't get what I wish for.

At the moment, following the Grid_bcApplyToRegionSpecialized.F90 boundary condition from de ShuOsher problem, I am able to inject a wind but from all the boundary, and I am not able to only inject the wind from a small region.

In the Grid_bcApplyToRegionSpecialized.F90 I don’t understand how I can limit the condition to only a small part of the boundary. The counter i goes from 1 to guard (where guard=4), and the counter j goes from 1 to je (where je=4).

  je=regionSize(SECOND_DIR)
  ke=regionSize(THIRD_DIR)
              do i = 1,guard
                 do j=1,je
                    if (gridDataStruct==CENTER) then
                       if (ivar == DENS_VAR) regionData(i,j,1:ke,ivar) = sim_rho
                       if (ivar == VELX_VAR) regionData(i,j,1:ke,ivar) = 0.
                       if (ivar == VELY_VAR) regionData(i,j,1:ke,ivar) = sim_v
                       if (ivar == VELZ_VAR) regionData(i,j,1:ke,ivar) = 0.
                       if (ivar == PRES_VAR) regionData(i,j,1:ke,ivar) = sim_p
                       if (ivar == GAMC_VAR) regionData(i,j,1:ke,ivar) = sim_gamma
                       if (ivar == GAME_VAR) regionData(i,j,1:ke,ivar) = sim_gamma
                    endif
                 end do
              end do

Do I have to replace the regionSize defined in the Grid file and use blkLimitsGC instead, or maybe use endPoints?

Or can I limit the region of the wind-injection boundary by setting some specific parameter in the user_bnd.F90 and flash.par (something like endPoints=?, or maybe regionSize=?).

Could anyone help me, or explain me how these arguments work in order for me to solve this issue?

Thanks!


C.

2018-03-21 12:42 GMT-06:00 María Fernanda Clever Uribe <clever_fisica at ciencias.unam.mx<mailto:clever_fisica at ciencias.unam.mx>>:
Hi;

You're right, I didn't notice the index. I will try this out.

Thanks!


C.

2018-03-21 7:51 GMT-06:00 Klaus Weide <klaus at flash.uchicago.edu<mailto:klaus at flash.uchicago.edu>>:
On Tue, 20 Mar 2018, María Fernanda Clever Uribe wrote:

> I also found an example of Grid_bcApplyToRegion.F90 and I thought that this
> could be the file I have to use instead of Grid_bcApplyToEdge.F90, because
> I want my boundary conditions to be only in the left corner of my domain. I
> took the example of this file from the Grid directory and I customized it.

Yes, that makes sense.

> I wrote a restriction over -X boundary where the jet has to be ejected, but
> I get a blast wave in all the cells in Y axis. I attached a picture of my
> results and also the file that I'm using.

The condition your wrote

                 if (i .eq. (guard-1.0)/guard) then

does not make sense to me.

It seems that you want different values for different valus of the SECOND
index of the regionData array. Currenly the whole range 1:je is treated
identically. It seems you have to write an explicit loop like

   DO j=1,je

and do different things inside the look depending on the j.

Klaus



--
Mordecai-Mark Mac Low  Curator & Professor
+1-212-496-3443          Department of Astrophysics
+1-212-769-5007 (fax)    American Museum of Natural History
mmaclow (Skype, Hangout)     79th St at CPW, NY, NY, 10024-5192, USA




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20180323/b4afa38c/attachment-0001.htm>


More information about the flash-users mailing list