[FLASH-USERS] Two sedov explosions

Ian Padilla ia6400pa-s at student.lu.se
Tue Jun 12 07:29:53 EDT 2018


Hello Suoqing,

I see, makes sense. But then in Simulation_adjustEvolution.F90 one would have some code from Simulation_initBlock.90 looking like:

If (some condition on 2nd explosion) then
	
	if (sim_tinitial .LE. 0.0) then 				! allocation of Profs
		 allocate(rProf(sim_nProfile)) 
		 allocate(vProf(sim_nProfile)) 
		 allocate(rhoProf(sim_nProfile)) 
		 allocate(pProf(sim_nProfile))
	end if

	do i = 1, sim_nProfile					! initialization	
		 rhoProf(i) = sim_rhoAmbient 
		pProf(i) = sim_pAmbient 
		 vProf(i) = 0. 
		 if (rProf(i) .le. sim_rInit) pProf(i) = sim_pExp 
	 enddo

end if

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:

do i = 1, sim_nProfile					! initialization	
		 rhoProf(i) = “ current rho "
		pProf(i) = “ current p "
		 vProf(i) = “ current v "
		 if (rProf(i) .le. sim_rInit) pProf(i) = sim_pExp 
enddo

Is there any way of getting the current Profs arrays? So that both second one doesn’t replace first one.

Thank you,

Ian Padilla
Lund University
 

> On Jun 11, 2018, at 23:27, Suoqing Ji <suoqing at physics.ucsb.edu> wrote:
> 
> Hi Ian,
> 
> The easiest way I can come up with is to take advantage of the subroutine Simulation_adjustEvolution.F90.
> 
> 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).
> 
> Hope this will do it!
> 
> Best wishes,
>> Suoqing Ji
> Department of Physics
> University of California, Santa Barbara
> http://physics.ucsb.edu/~suoqing <http://physics.ucsb.edu/~suoqing>
> 
>> On Jun 11, 2018, at 2:16 PM, Ian Padilla <ia6400pa-s at student.lu.se <mailto:ia6400pa-s at student.lu.se>> wrote:
>> 
>> Dear all,
>> 
>> 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.
>> 
>> Here what I’ve done so far:
>> 
>> 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: 
>> 
>> 	if( (dr_simTime .ge. 0.0 .and. dr_simTime < 0.01) .or. (dr_simTime .ge. 0.05) ) then 
>> 		 call Timers_start("Hydro”) 
>> 		 call Hydro(blockCount, blockList, 
>> 			 & dr_simTime, dr_dt, dr_dtOld, sweepDummy) 
>> 		 call Timers_stop("Hydro”) 
>> 		 call Driver_driftUnk(__FILE__,__LINE__,driftUnk_flags) 
>> 	 end if
>> 
>> 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.
>> 
>> I’m not sure this is the best way of doing it. I'd be very grateful if you had any tips on this.
>> 
>> Thanks in advance,
>> 
>> Ian Padilla
>> Lund University
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20180612/5b20a354/attachment.htm>


More information about the flash-users mailing list