<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Ian,<div class=""><br class=""></div><div class="">I can see what you mean. I’m not sure what’re the profiles which you would like to implement, but I agree that the evolved status should not be changed except for adding a hot spot in internal energy. If you want to add some profiles for the second explosion, I might suggest to implement these profiles in Simulation_initBlock, and only do ignition for the second explosion here. This question really depends on what kind of physical problem you want to simulate.</div><div class=""><br class=""></div><div class="">In addition, I agree with Jon that the timestep requires some special treatment.<br class=""><div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class="">Best wishes,<br class="">—<br class="">Suoqing Ji<br class="">Department of Physics<br class="">University of California, Santa Barbara<br class=""><a href="http://physics.ucsb.edu/~suoqing" class="">http://physics.ucsb.edu/~suoqing</a></div></div></div></div>
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Jun 12, 2018, at 4:29 AM, Ian Padilla <<a href="mailto:ia6400pa-s@student.lu.se" class="">ia6400pa-s@student.lu.se</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello Suoqing,<div class=""><br class=""></div><div class="">I see, makes sense. But then in Simulation_adjustEvolution.F90 one would have some code from Simulation_initBlock.90 looking like:</div><div class=""><br class=""></div><div class="">If (some condition on 2nd explosion) then</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>if (sim_tinitial .LE. 0.0) then <span class="Apple-tab-span" style="white-space:pre"> </span>! allocation of Profs</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span> allocate(rProf(sim_nProfile)) </div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span> allocate(vProf(sim_nProfile)) </div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span> allocate(rhoProf(sim_nProfile)) </div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span> allocate(pProf(sim_nProfile))</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>end if</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>do i = 1, sim_nProfile<span class="Apple-tab-span" style="white-space:pre"> </span>! initialization<span class="Apple-tab-span" style="white-space:pre"> </span></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span> rhoProf(i) = sim_rhoAmbient </div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>pProf(i) = sim_pAmbient </div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span> vProf(i) = 0. </div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span> if (rProf(i) .le. sim_rInit) pProf(i) = sim_pExp </div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span> enddo</div><div class=""><br class=""></div><div class="">end if</div><div class=""><br class=""></div><div class="">Then this initialization would replace the values in the blocks belonging to the other explosion already evolved. I guess I’m looking for something like:</div><div class=""><br class=""></div><div class=""><div class="">do i = 1, sim_nProfile<span class="Apple-tab-span" style="white-space: pre;"> </span>! initialization<span class="Apple-tab-span" style="white-space: pre;"> </span></div><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span> rhoProf(i) = “ current rho "</div><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>pProf(i) = “ current p "</div><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span> vProf(i) = “ current v "</div><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span> if (rProf(i) .le. sim_rInit) pProf(i) = sim_pExp </div><div class="">enddo</div></div><div class=""><br class=""></div><div class="">Is there any way of getting the current Profs arrays? So that both second one doesn’t replace first one.</div><div class=""><br class=""></div><div class="">Thank you,</div><div class=""><br class=""></div><div class="">Ian Padilla</div><div class="">Lund University</div><div class=""> <br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Jun 11, 2018, at 23:27, Suoqing Ji <<a href="mailto:suoqing@physics.ucsb.edu" class="">suoqing@physics.ucsb.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Ian,<div class=""><br class=""></div><div class="">The easiest way I can come up with is to take advantage of the subroutine Simulation_adjustEvolution.F90.</div><div class=""><br class=""></div><div class="">In your Simulation_initBlock, you can initialize the first explosion only. And then in Simulation_adjustEvolution, you set a trigger to start the second explosion (say, when simtime >= 2nd_explosion_time and 2nd_exploded = .false., trigger the second explosion, and then mark the flag “2nd_exploded” as .true. to make sure it’s triggered only once).</div><div class=""><br class=""></div><div class="">Hope this will do it!<br class=""><div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class="">Best wishes,<br class="">—<br class="">Suoqing Ji<br class="">Department of Physics<br class="">University of California, Santa Barbara<br class=""><a href="http://physics.ucsb.edu/~suoqing" class="">http://physics.ucsb.edu/~suoqing</a></div></div></div></div>
</div>
<div class=""><br class=""><blockquote type="cite" class=""><div class="">On Jun 11, 2018, at 2:16 PM, Ian Padilla <<a href="mailto:ia6400pa-s@student.lu.se" class="">ia6400pa-s@student.lu.se</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Dear all,<br class=""><br class="">I’m working on two identical Sedov explosions centered at x=0.3 and x=0.8, respectively, in a [1,1,1] domain box. I’d like one of them to start later than the other and I’m looking for advise on how to delay the evolution of one of them.<br class=""><br class="">Here what I’ve done so far:<br class=""><br class="">I have set Simulation_initBlock to initialize both explosions. Naively one can “pause” the evolution of BOTH explosions by writing an if-stament in Driver_evolveFlash: <br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>if( (dr_simTime .ge. 0.0 .and. dr_simTime < 0.01) .or. (dr_simTime .ge. 0.05) ) then <br class=""><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span> call Timers_start("Hydro”) <br class=""><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span> call Hydro(blockCount, blockList, <br class=""><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span> & dr_simTime, dr_dt, dr_dtOld, sweepDummy) <br class=""><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span> call Timers_stop("Hydro”) <br class=""><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span> call Driver_driftUnk(__FILE__,__LINE__,driftUnk_flags) <br class=""><span class="Apple-tab-span" style="white-space:pre"> </span> end if<br class=""><br class="">Since I’d like to stop the evolution of only ONE explosion (please correct me if I’m mistaken) one solution is to identify (inside Driver_evolveFlash) the blocks with center < 0.5 (using Grid_getBlkCenterCoords(blockId, blockCenter)) and remove them from the blockList array that then is passed to Hydro sequence, so that only blocks belonging to the explosion at x = 0.8 get updated in the hydro unit.<br class=""><br class="">I’m not sure this is the best way of doing it. I'd be very grateful if you had any tips on this.<br class=""><br class="">Thanks in advance,<br class=""><br class="">Ian Padilla<br class="">Lund University<br class=""><br class=""></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></body></html>