<div dir="ltr">Hi Nishka,<div><br></div><div>Note that in setting the boundary conditions you are setting the values of the <i>guard </i>cells. Your analysis script likely thinks of the boundary as being the <i>physical</i> cells at the domain faces/edges/corners. See below for an ASCII illustration (G for guard cells, I for interior cells, U for "ultimate interior cells" -- if I was re-doing this I'd call those B). The value of those cells are updated the same as any other cell in FLASH, and likely is not going to stay fixed with time. I've found that's problematic for problems including gravity with diode boundary conditions and fix the value of the physical boundary cells. I'm not sure if that's appropriate or not in your case or not though.</div><div><br></div><div>If you do want to try that, you can add a subroutine call at the beginning of Grid_fillGuardCells to tweak the values of the physical boundary cells.</div><div><br></div><div>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(50,244,241)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">!!<span class="gmail-Apple-converted-space"> </span>GGGGGGGG</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(50,244,241)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">!! GUUUUUUUUG</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(50,244,241)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">!! GUIIIIIIUG</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(50,244,241)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">!! GUIIIIIIUG</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(50,244,241)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">!! GUIIIIIIUG</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(50,244,241)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">!! GUIIIIIIUG</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(50,244,241)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">!! GUIIIIIIUG</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(50,244,241)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">!! GUIIIIIIUG</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(50,244,241)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">!! GUUUUUUUUG</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(50,244,241)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">!!<span class="gmail-Apple-converted-space"> </span>GGGGGGGG</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(50,244,241)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">!!</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(50,244,241)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">!! Figure 1. G = ghost zones, I for interior zone, U is an ultimate</span></p>
<p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Menlo;color:rgb(50,244,241)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">!! interior zone (i.e., it borders a ghost zone).</span></p></div><div><br></div><div>Best,<br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr">--------<div>Ryan</div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 3, 2023 at 8:41 PM Sheth, Nishka <<a href="mailto:phc027@usask.ca">phc027@usask.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg248091527851249506">
<div dir="ltr">
<div><span style="font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;margin:0px;color:rgb(0,0,0);background-color:rgb(255,255,255)"><span style="margin:0px;background-color:rgb(255,255,255)"><span style="margin:0px;background-color:rgb(255,255,255);display:inline">Hello
Everyone,</span></span></span></div>
<div style="font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;margin:0px;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<div style="margin:0px;background-color:rgb(255,255,255)">
<div style="margin:0px;background-color:rgb(255,255,255)"><br>
</div>
<div style="margin:0px;background-color:rgb(255,255,255)">
I am currently working on setting up a MHD problem in the r-z geometry with uniform grid using FLASH 4.7. My current goal is to keep the x_max boundary values fixed to their initial values throughout the simulation. To achieve this, I have modified the<span style="margin:0px"> </span><i>Grid_bcApplyToRegionSpecialized.F90</i><span style="margin:0px"> </span>file
in a similar way to the Shu Osher problem. However, I have noticed that the boundary values still vary with time.</div>
<div style="margin:0px;background-color:rgb(255,255,255)"><br>
</div>
<div style="margin:0px;background-color:rgb(255,255,255)">
To investigate this issue, I ran the Shu-Osher problem for longer than 1.8s, which is sufficient time for the shock front to reach the x_max boundary. Interestingly, I observed that the boundary values also changed for this simulation. I have attached snapshots
of the Density vs X plot for the Shu Osher problem at 1.8s (as shown in the user manual) and at 2.4s, where the boundary value differs from the initial value.</div>
<div style="margin:0px;background-color:rgb(255,255,255)"><br>
</div>
<div style="margin:0px;background-color:rgb(255,255,255)">
I would greatly appreciate any guidance on setting up a fixed value boundary condition for the MHD simulation. <span style="margin:0px;background-color:rgb(255,255,255);display:inline">Additionally,
could you recommend a reference that describes how general type of boundary conditions (such as Newman, Dirichlet, etc.) for all primitive variables are set up in FLASH for the MHD simulation?</span></div>
<div style="margin:0px;background-color:rgb(255,255,255)"><br>
</div>
</div>
<div style="margin:0px;background-color:rgb(255,255,255)">
<span style="margin:0px;background-color:rgb(255,255,255);display:inline">Thank you in advance for your help.</span><br style="background-color:rgb(255,255,255)">
</div>
<div style="margin:0px;background-color:rgb(255,255,255)">
<br style="background-color:rgb(255,255,255)">
<span style="margin:0px;background-color:rgb(255,255,255);display:inline">Nishka Sheth </span><br style="background-color:rgb(255,255,255)">
<span style="margin:0px;background-color:rgb(255,255,255);display:inline">Physics Graduate Student</span><br style="background-color:rgb(255,255,255)">
<span style="margin:0px;background-color:rgb(255,255,255);display:inline">University of Saskatchewan, Canada</span><br style="background-color:rgb(255,255,255)">
<span style="margin:0px;background-color:rgb(255,255,255);display:inline"><a href="mailto:phc027@usask.ca" target="_blank">phc027@usask.ca</a></span></div>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
</div>
_______________________________________________<br>
flash-users mailing list<br>
<a href="mailto:flash-users@flash.rochester.edu" target="_blank">flash-users@flash.rochester.edu</a><br>
<br>
For list info, including unsubscribe:<br>
<a href="https://flash.rochester.edu/mailman/listinfo/flash-users" rel="noreferrer" target="_blank">https://flash.rochester.edu/mailman/listinfo/flash-users</a><br>
</div></blockquote></div>