[FLASH-USERS] Modified ideal gas EOS implementation

Acharya, Nitish nachary2 at ur.rochester.edu
Mon Apr 27 14:18:33 EDT 2020


I actually had modified the exact locations in the code that you have suggested here few days back.

 My ion pressure goes negative which is desirable for my problem because i want to simulate tension in the material. To mitigate the issue of imaginary sound speed, i wanted to correct the sound speed as well.

Can i not have negative ion pressures?


Sent from Outlook Mobile<https://aka.ms/blhgte>
________________________________
From: flash-users-bounces at flash.uchicago.edu <flash-users-bounces at flash.uchicago.edu> on behalf of Klaus Weide <klaus at flash.uchicago.edu>
Sent: Monday, April 27, 2020 1:01:25 PM
To: flash-users at flash.uchicago.edu <flash-users at flash.uchicago.edu>
Subject: Re: [FLASH-USERS] Modified ideal gas EOS implementation

On Mon, 27 Apr 2020, Acharya, Nitish wrote:

> I am working on implementing a slightly modified version of ideal-gas EOS for laserslab problem. I have been able to implement the default ideal-gas EOS. The way i want it to modify is :
>
> 1) P_ion = rho_ion*R*T_ion/A - P_correction
>     e_ion = R*T/(A*(gam-1)) + e_correction
>    where P_correction and e_correction are some correction constants
>    I would want to do similar correction to electron part as well.
>
> 2) I would want to compute sound speed using the pressure P = P_ion+ P_ele+P_rad + P_correction
>
> My par file has :
>                         eosMode : dens_ie_recal_gather
>                         eosInitMode : dens_temp_gather
>
> I am having hard time finding the locations within the eos routines where I make all these modifications. I would really appreciate any help.


It looks like you are working with the right file, (a copy of)
physics/Eos/EosMain/multiTemp/Gamma/Ye/eos_idealGamma3T.F90 .

I will point to the code in that file that should be of most importance
for you.  (There are many other places in that file that should be
modified for consistency, but they should not be reached in the courser of
execution, as long as you stick with using 3T Multitype Eos and the eos
modes quoted above.)

Note that all code I will point to is AFTER the LAST occurrence of

|  select case (mode)
(about l. 635)


1. the section after
|  case (MODE_DENS_TEMP_ION)
(about l. 648)

2. the section after
|  case (MODE_DENS_TEMP_ELE)
(about l. 663)
(Maybe not, if your offset only applies to ions.)

3. the following sections will probably also need modifications, after  about l. 1121:
|     if(mask(EOS_DET))then
  ...

|     if(mask(EOS_CV))then
  ...

|     if(mask(EOS_CVION))then
  ...

|     if(mask(EOS_CVELE))then
(Maybe not, if your offset only applies to ions.)
  ...


This should get you started. There may be other places that need changes.
I make no claims that this will actually work.


The above basically only addresses part 1) of your question.
For part 2),
 1. You need to make sure the Eos returns the GAMC you need
    (Testing and maybe further Eos code changes will be needed), and
 2. you need a customized Hydro_computeDt.F90 .


If either one of your pressures or one of your energies goes down to
zero or below anywhere, you may be in trouble anyway. Various places
in the implementation of Hydro, in particular, may fail when that
happens.


Klaus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20200427/5488f17b/attachment.htm>


More information about the flash-users mailing list