[FLASH-USERS] Newbie Question: Adding Variables

John ZuHone jzuhone at milkyway.gsfc.nasa.gov
Thu Dec 20 21:15:54 EST 2012


What was the fix? Resetting up or the tweak in the Config file?

John ZuHone
Laboratory for High-Energy Astrophysics
NASA/Goddard Space Flight Center
8800 Greenbelt Rd., Code 662
Greenbelt, MD 20771
(w) 301-286-2531
(m) 773-758-0172
jzuhone at gmail.com
john.zuhone at nasa.gov

On Dec 20, 2012, at 8:06 PM, "Henry (Trae) Winter" <traewinter at gmail.com> wrote:

> John,
> 
> I made a new directory under Simulation/SimulationMain/ called SodClump. I made the changes before I did ./setup SodClump -auto.
> 
> -Trae
> 
> 
> On Dec 20, 2012, at 5:45 PM, John ZuHone wrote:
> 
>> Hi Henry,
>> 
>> Just a quick question first--had you compiled this code first in an object directory and you're trying to recompile after making these changes? If you add anything to the Config file you need to re-setup the code in this directory first, which you can do by issuing "./resetup" within the object directory, after which you can recompile. 
>> 
>> Best,
>> 
>> John
>> 
>> On Dec 20, 2012, at 5:41 PM, "Henry (Trae) Winter" <hwinter at cfa.harvard.edu> wrote:
>> 
>>> I am teaching myself to use Flash and need some very basic help.  
>>> 
>>> I want to add clumps of material to the Sod simulation and watch them evolve as the shock hits them.  Simple.  I define an x and y position, a radius, a density, and a pressure for a clump.
>>> 
>>> In the flash.par file for the Sod problem I add the following:
>>> 
>>> #  Clump parameters. rho and pressure are added to background values.
>>> sim_cposx=  2.5
>>> sim_cposy=  2.5
>>> sim_crad=    0.5
>>> sim_crho=    2
>>> sim_cp=        0.0 
>>> 
>>> In my Config file I add the following:
>>> 
>>> PARAMETER sim_cposx REAL  2.5
>>> PARAMETER sim_cposy  REAL 2.5
>>> PARAMETER sim_crad  REAL  0.5
>>> PARAMETER sim_crho  REAL  2
>>> PARAMETER sim_cp     REAL   0.0
>>> 
>>> In my Simulation_data.F90 file I add:
>>> 
>>> real, save :: sim_cposx, sim_cposy, sim_crad, sim_crho, sim_cp
>>> 
>>> 
>>> In the Simulation_init.F90 file I add:
>>> 
>>> call RuntimeParameters_get('sim_cposx', sim_cposx)
>>> call RuntimeParameters_get('sim_cposy', sim_cposy)
>>> call RuntimeParameters_get('sim_crad', sim_crad)
>>> call RuntimeParameters_get('sim_crho', sim_crho)
>>> call RuntimeParameters_get('sim_cp', sim_cp)
>>> 
>>> In the Simulation_initBlock.F90 I add the last line:
>>> 
>>> use Simulation_data, ONLY: sim_posn, sim_xCos, sim_yCos, sim_zCos, &    
>>>   &  sim_rhoLeft,  sim_pLeft, sim_uLeft, sim_rhoRight, sim_pRight, sim_uRight, &
>>>   &  sim_smallX, sim_gamma, sim_smallP, &
>>>   &  sim_cposx, sim_cposy, sim_crad, sim_crho, sim_cp
>>> 
>>> The code compiles.  When I try to run it I get the following error:
>>> 
>>> WARNING: requested real parameter 'sim_crho' not found  
>>> 
>>> What am I forgetting?
>>> 
>>> Thanks,
>>> -Trae
>>> 
>>> 
>>> 
>>> -------------------------------------------------------------------------------------
>>> Dr. Henry (Trae) Winter III        
>>> Astrophysicist                Tel:    617-495-7400
>>> Center for Astrophysics        Fax:   617-496-7577
>>> 60 Garden Street, MS 58        Cell:  617-755-7967
>>> Cambridge, MA 02138        hwinter at cfa.harvard.edu
>>> -------------------------------------------------------------------------------------
> 
> 
> -------------------------------------------------------------------------------------
> Dr. Henry (Trae) Winter III        
> Astrophysicist                Tel:    617-495-7400
> Center for Astrophysics        Fax:   617-496-7577
> 60 Garden Street, MS 58        Cell:  617-755-7967
> Cambridge, MA 02138        hwinter at cfa.harvard.edu
> -------------------------------------------------------------------------------------
> 
> 
> 
> 
> 



More information about the flash-users mailing list