[FLASH-USERS] [EXT] Re: Extra Refinement for Area

Kaldawi, Thomas Tkal at lle.rochester.edu
Thu Jun 8 11:49:47 EDT 2023


Just so I can have this sent to the full users list. I actually did end up using gr_markInRectangle. Here is what I wrote in Grid_markRefineDerefine:

specs_foil(1) = 0 !lower x
specs_foil(2) = 500.0e-4 !upper x
specs_foil(3) = 1000.0e-4 !lower y
specs_foil(4) = 1200.0e-4 !upper y
specs_foil(5) = 0 !z does not matter to me
specs_foil(6) = 0
specs_foil(7) = 0 !for overlap

call Grid_markRefineSpecialized(RECTANGLE,7,specs_foil,11)

Of course, you also need to declare specs, so do not forget to add this in the top of the file:

real, dimension(1:7) :: specs_foil

Also, do not forget to add Grid_markRefineSpecialized.F90 to your simulation folder (for me this is LaserSlab) before running setup.

Best,
Thomas Kaldawi

P.S.

Benjamin, I think you can simply add an if statement around the Grid_markRefineSpecialized to turn off the refinement past a specified n-step or time-step. You can get these values from one of the Driver files I forget which one though.
________________________________
From: Benjamin Musick <musick_bj at tamu.edu>
Sent: Tuesday, June 6, 2023 2:56 PM
To: Kaldawi, Thomas <Tkal at lle.rochester.edu>
Cc: Lewis,Sean <scl63 at drexel.edu>; flash-users at flash.rochester.edu <flash-users at flash.rochester.edu>
Subject: Re: [FLASH-USERS] [EXT] Re: Extra Refinement for Area

Hello Thomas and Sean,

For Paramesh, I have not had much success using Grid_markRefineSpecialized but have obtained reasonably good results by calling gr_markInRectangle in Grid_markRefineDerefine.

Once you refine those blocks, they will stay at that level. Logic needs to be added to gr_markInRectangle to derefine the area if at a later time in the simulation you desire a coarser mesh there.

Block count and max/min level of refinement may still need to be adjusted to get good behavior.

Hope that helps you out.

On Tue, Jun 6, 2023 at 12:23 PM Kaldawi, Thomas <Tkal at lle.rochester.edu<mailto:Tkal at lle.rochester.edu>> wrote:
I think I am starting to get it to work. For me, I needed to copy and paste some parts of the simulation_initBlock into the Grid_markRefineDerefine so I could loop through the x and y coordinates for each block. You may also need to set the
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside your organization.

ZjQcmQRYFpfptBannerEnd
I think I am starting to get it to work. For me, I needed to copy and paste some parts of the simulation_initBlock into the Grid_markRefineDerefine so I could loop through the x and y coordinates for each block.

You may also need to set the region wider than needed if you do not have enough blocks. This is the problem I was having, because I would give it a rectangular region, but because I did not have enough blocks in the y direction it would not recognize that region as part of the foil.

Thank you for the help!

On Jun 6, 2023, at 12:54, Lewis,Sean <scl63 at drexel.edu<mailto:scl63 at drexel.edu>> wrote:



Hi Thomas,



I am attempting something very similar (though for an astrophysical simulation). Assuming your setup uses Paramesh, there’s a set of routines meant for defining a specific region to be refined: /source/Grid/GridMain/paramesh/{Grid_markRefineSpecialized.F90,gr_markInRectangle.F90}. Grid_markRefineSpecialized can be called by Grid_markRefineDerefine() and given a specific rectangular (or spherical/elliptical) region to mark all blocks within for refinement.



I personally have not gotten this behavior to work however, the grid seems to just ignore the refinement region, but it might be a place for you to start. I’m still running tests on this, but if anyone else has used this routine and thinks it may be good for Thomas please chime in. I’ll let you know if I make any progress with this.



-Sean



Sean C. Lewis

Doctoral Candidate

Department of Physics

Drexel University



From: flash-users <flash-users-bounces at flash.rochester.edu<mailto:flash-users-bounces at flash.rochester.edu>> on behalf of "Kaldawi, Thomas" <Tkal at lle.rochester.edu<mailto:Tkal at lle.rochester.edu>>
Date: Tuesday, June 6, 2023 at 10:28 AM
To: "flash-users at flash.rochester.edu<mailto:flash-users at flash.rochester.edu>" <flash-users at flash.rochester.edu<mailto:flash-users at flash.rochester.edu>>
Subject: [FLASH-USERS] Extra Refinement for Area



External.

Hello,



I am trying to add refinement to a specific area of the LaserSlab simulation. In the Pdf I sent, I have the entire simulation, which is just a target, support, and two very thin foils at the bottom connected to the support. As you can see, I have refined the edges of the target and the support; however, the foils are too thin to be recognized. If I increase the total blocks in the y direction to ~70, the two foils can easily be distinguished, but I do not want this much refinement in the rest of the simulation. Is there a way to simply add blocks/refine only a certain area in the simulation?



For clarification, the foils are two different sizes, one is half a micron, and the other is around 30 nanometers; thus, I need a fairly high level of refinement for that area. Also, the foils are supposed to connect from the yellow/green support to the left wall. However, they cut off before reaching the left side of the window. So, the red foil is indeed supposed to appear between those sections, but for some reason it just cuts off even more than the second foil.



Thanks!

_______________________________________________
flash-users mailing list
flash-users at flash.rochester.edu<mailto:flash-users at flash.rochester.edu>

For list info, including unsubscribe:
https://urldefense.com/v3/__https://flash.rochester.edu/mailman/listinfo/flash-users__;!!KwNVnqRv!ARsrGmalBuUizNMY533OJUdZ4_bDE34_GVKV9Bvy58XBzT_RKtSd4LnLQhtpo6gZ_1G164e5g5GSsmhimH_Cqw$


--
Thanks,
Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20230608/1bf9c6c3/attachment.htm>


More information about the flash-users mailing list