[FLASH-USERS] Regarding FLASH simulation basics
Hansen, Eddie
ehansen at pas.rochester.edu
Mon Oct 14 15:06:28 EDT 2024
Hi Mohammad,
Apologies if someone has already answered you, but here are the basics for setting up your own problem:
1. Each simulation directory inside SimulationMain has its own Config file. This is where you would define your own custom runtime parameters with default values. This tells the code (during setup) about all the runtime parameters that can potentially be read in from the flash.par file.
2. Usually, one also defines the same parameters inside Simulation_data.F90 in order to use them as local variables within the other Simulation_* subroutines (and potentially elsewhere in the code).
3. Simulation_init.F90 is where you initialize those variables defined in Simulation_data.F90. The typical approach is to use a call to RuntimeParameters_get() to assign a Config runtime parameter to a local variable that you defined in Simulation_data.F90.
4. Simulation_initBlock.F90 is where you define your domain by going through do loops and assigning values based on position or some other criteria. One of the more common ways of initializing a plasma is to define its density and temperatures (assuming 3T), and set eosModeInit = “dens_temp_gather” in your flash.par file. EOS is always called after the simulation initialization, and this mode will correctly initialize the pressures and energies for you.
Hopefully that all made sense to you and gets you started.
--
Eddie Hansen
Applications Group Leader
Flash Center for Computational Science
From: flash-users <flash-users-bounces at flash.rochester.edu> on behalf of phz238490 <phz238490 at iitd.ac.in>
Date: Monday, September 30, 2024 at 1:52 AM
To: flash-users at flash.rochester.edu <flash-users at flash.rochester.edu>
Subject: [FLASH-USERS] Regarding FLASH simulation basics
Dear Flash users,
My name is Mohammad Yasir, and I have recently started my doctoral
studies. As part of my work, I am looking to simulate laser-matter
interactions and FLASH is going to be part of my repertoire.
I have been going through the FLASH user manual and while the running
process itself is straightforward, I am unable to understand how to
setup my own simulations. Here us what I know so far:
1. To setup a simulation, there are a number of files I must define,
including config file, a few f90 files and flash.par file. Then compile
the program and execute. That sounds straightforward.
2. I know that the config file contains information about required
headers, runtime parameters, etc. I know what each f90 file is supposed
to do. But that is where it gets muddy for me. I would be obliged if you
could help me understand some things.
1. I can figure out what units to use depending on the physics I
require. But what about the runtime variables, etc. I went through the
test Sedov problem. It defines sim_rhoAmbient and such variables. But
why and where is this used? Theoretically, what's stopping me from
defining a variable called my_dummy_variable, giving it a value. And if
I did define it, how would FLASH know what to do with it?
2. To setup a simulation, which variables SHOULD I define?
3. Once defined, how does FLASH know what these variables are, how they
evolve, and what to do with them?
As someone who is more accustomed to PIC simulations using EPOCH/SMILEI,
this is new territory for me, and I apologize if the questions don't
make sense. If someone has a resource that explains the process better,
or someone has ideas on how to make it simpler, kindly let me know.
Regards,
Mohammad Yasir
Research Scholar
Department of Physics
_______________________________________________
flash-users mailing list
flash-users at flash.rochester.edu
For list info, including unsubscribe:
https://flash.rochester.edu/mailman/listinfo/flash-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20241014/56da1acd/attachment.htm>
More information about the flash-users
mailing list