[FLASH-USERS] Newbie Question: Adding Variables

Henry (Trae) Winter hwinter at cfa.harvard.edu
Thu Dec 20 20:19:17 EST 2012


Oh for goodness sake.  That was it!  I feel stupid now.  Thanks for the help.

-Trae

On Dec 20, 2012, at 5:57 PM, Ji Suoqing wrote:

> Hi Trae,
> 
> My suggestion is simple: in your config file, you could change:
> 
>>  PARAMETER sim_crho  REAL  2
> 
> into
> 
> PARAMETER sim_crho REAL 2.
> 
> notice there's a dot at the end. Then you could try to resetup and compile as John suggested.
> 
> Best wishes,
> Suoqing
> 
> 
> 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