<div dir="ltr"><div dir="ltr">Hi Antoine! <div><br></div><div>Taking into account this</div><div><div>>>The goal is to impose for a certain condition on the cell, that the </div><div>>>fluid cannot move during the hydro update at a given time step. </div></div><div>and this </div><div><div>>>I need to do during a hydro time step, <br></div><div>>>If the cell reaches a certain condition that depend on the hydro state then <br></div><div>>>impose that the velocity is zero during computation of the fluxes during this step (fluid is static)</div><div><br></div></div><div>and following Marissa's suggestion, I do not see why you may not do what you want from the <font face="monospace">Simulation_adjustEvolution </font></div><div>routine. From there you can access all grid cells at any time step, and force desired cells to have null speeds. </div><div>It may look like something like this: </div><div><br></div><div><br></div><div><font face="monospace"> if (time > a .and. time < b) then <br><br> do n=1,num_blocks<br> blockId = blockList(n)<br><br> call Grid_getBlkCenterCoords(blockId,blkCenterC) <br> call Grid_getBlkPtr(blockId,S,CENTER)<br><br> do k=blk(LOW,KAXIS),blk(HIGH,KAXIS)<br> do j=blk(LOW,JAXIS),blk(HIGH,JAXIS)<br> do i=blk(LOW,IAXIS),blk(HIGH,IAXIS)<br> </font></div><div><font face="monospace"> if (x > xa .and. x< xb) <br> U(VELX_VAR,i,j,k) = 0.0</font></div><div><span style="font-family:monospace"> U(VELY_VAR,i,j,k) = 0.0</span><font face="monospace"><br></font></div><div><span style="font-family:monospace"> U(VELZ_VAR,i,j,k) = 0.0</span><br></div><div><font face="monospace"><br></font></div><div><font face="monospace"> statement 1...</font></div><div><font face="monospace"> statement 2...</font></div><div><span style="font-family:monospace"> endif</span><font face="monospace"><br></font></div><div><font face="monospace"> <br> enddo<br> enddo<br> enddo<br><br> call Grid_releaseBlkPtr(blockId,S)<br><br> enddo <br></font><br> endif<br></div><div><br></div><div>Would not it help something like this?</div><div><br></div><div><br></div><div>>>What I need is to look into the physics/hydro directory to modify the computation of the fluxes. <br></div><div>This should be a much harder way. The path you should follow is </div><div><br></div><div><font face="monospace">Flash.F90 --> Driver_evolveFlash.F90 --> Hydro.F90 --> hy_uhd_unsplit.F90 --> hy_uhd_getFaceFlux</font></div><div><br></div><div>Best! </div><div>Ernesto</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El dom, 26 sept 2021 a las 14:53, Antoine Gintrand (<<a href="mailto:antoine.gintrand@gmail.com" target="_blank">antoine.gintrand@gmail.com</a>>) escribió:<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 dir="ltr">Hi Marissa,<div><br></div><div>Thank you very much for the help,</div><div><br></div><div>Unfortunately, this will not help because I need to do the modification during the simulation</div><div>not impose something from the beginning that will not change during the simulation.</div><div>So typically not in <i>Simulation_initBlock.F90.</i></div><div><br></div><div>What I need is to look into the physics/hydro directory to modify the computation of the fluxes.</div><div><br></div><div>I need to do during a hydro time step, <br></div><div><br></div><div>If the cell reaches a certain condition that depend on the hydro state then </div><div><br></div><div>impose that the velocity is zero during computation of the fluxes during this step (fluid is static)</div><div><br></div><div>If anyone has an idea on where to do this in the hydro part of the code it will help me a lot.</div><div><br></div><div>All the best,</div><div><br></div><div>Antoine</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le dim. 26 sept. 2021 à 15:29, Marissa B. P. Adams <<a href="mailto:madams@pas.rochester.edu" target="_blank">madams@pas.rochester.edu</a>> a écrit :<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 dir="ltr"><div dir="ltr">Hi Antoine,<div><br></div><div>Have you considered using a "mask"? Depending on the conditions, i.e. if you want this to be the case for all time from the beginning, you can do this in <i>Simulation_initBlock.F90</i>. It'd look something like this:<br><br>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:"Andale Mono";color:rgb(47,255,18);background-color:rgba(0,0,0,0.9)"><span style="font-variant-ligatures:no-common-ligatures">call Grid_putPointData(blockId, CENTER, BDRY_VAR, EXTERIOR, axis, 1.0)</span></p></div></div><div><br></div><div>See section 14.1.3.1. Implementation of Stationary Rigid Body in a Simulation Domain for Unsplit Hydro
Solver, in the user manual. </div><div><br></div><div>I would also recommend using the routine <i>Simulation_adjustEvolution.F90</i> for accessing things for each time step or advancement from the Driver. </div><div><br></div><div>These are just my initial thoughts! I hope they can help.<br>Marissa</div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Sep 26, 2021 at 5:20 AM Antoine Gintrand <<a href="mailto:antoine.gintrand@gmail.com" target="_blank">antoine.gintrand@gmail.com</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 dir="ltr">Dear Flash users,<div><br></div><div>I need to modify the code for a "laser slab" type simulation.</div><div><br></div><div>The goal is to impose for a certain condition on the cell, that the </div><div>fluid cannot move during the hydro update at a given time step.</div><div>The cell can only increase his internal energy (laser, heat conduction ...) in this </div><div>condition.</div><div><br></div><div>Thus, I think that I probably need to specify in the hydro part of the source code that the velocity should be zero during the computation of the fluxes. </div><div><br></div><div>The problem is that I do not know which file I should modify to impose that </div><div>during the update of the hydro step.</div><div><br></div><div>Any suggestion would be highly appreciated,</div><div><br></div><div>thank you for your help,</div><div><br></div><div>All the best,</div><div><br></div><div>Antoine</div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font face="monospace" size="1" color="#000000">%---------------------------------------------%</font><div><font face="monospace" size="1" color="#000000">Marissa B. P. Adams</font></div><div><font face="monospace" size="1" color="#000000">(she/her/hers)</font></div><div><font face="monospace" size="1" color="#000000">Phd Candidate, University of Rochester</font></div><div><font size="1"><b style="color:rgb(0,0,0);font-family:monospace">E-mail:</b><span style="color:rgb(0,0,0);font-family:monospace"> <a href="mailto:madams@pas.rochester.edu" target="_blank">madams@pas.rochester.edu</a></span><br></font></div><div><font face="monospace" size="1" color="#000000"><b>Website:</b> <a href="http://www.pas.rochester.edu/~madams#" target="_blank">https://www.pas.rochester.edu/~madams</a></font></div><div><font size="1"><b style="color:rgb(0,0,0);font-family:monospace">Current Location:</b><br></font></div><div><font color="#000000" face="monospace" size="1">Occupied Seneca Land</font></div><div><font color="#000000" face="monospace" size="1">471 Bausch and Lomb Hall</font></div><div><font color="#000000" face="monospace" size="1">University of Rochester</font></div><div><font color="#000000" face="monospace" size="1">Rochester, NY 14627</font></div></div></div></div></div></div></div></blockquote></div></blockquote></div></div>