<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255); text-align: left;" dir="auto">
I actually had modified the exact locations in the code that you have suggested here few days back.</div>
<div style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255); text-align: left;" dir="auto">
<br>
</div>
<div style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255); text-align: left;" dir="auto">
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. </div>
<div style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255); text-align: left;" dir="auto">
<br>
</div>
<div style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255); text-align: left;" dir="auto">
Can i not have negative ion pressures?</div>
<div style="color: rgb(33, 33, 33); background-color: rgb(255, 255, 255); text-align: left;" dir="auto">
<br>
</div>
<div id="ms-outlook-mobile-signature">
<div><br>
</div>
Sent from <a href="https://aka.ms/blhgte">Outlook Mobile</a></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> flash-users-bounces@flash.uchicago.edu <flash-users-bounces@flash.uchicago.edu> on behalf of Klaus Weide <klaus@flash.uchicago.edu><br>
<b>Sent:</b> Monday, April 27, 2020 1:01:25 PM<br>
<b>To:</b> flash-users@flash.uchicago.edu <flash-users@flash.uchicago.edu><br>
<b>Subject:</b> Re: [FLASH-USERS] Modified ideal gas EOS implementation</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Mon, 27 Apr 2020, Acharya, Nitish wrote:<br>
<br>
> 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 :<br>
> <br>
> 1) P_ion = rho_ion*R*T_ion/A - P_correction<br>
> e_ion = R*T/(A*(gam-1)) + e_correction<br>
> where P_correction and e_correction are some correction constants<br>
> I would want to do similar correction to electron part as well.<br>
> <br>
> 2) I would want to compute sound speed using the pressure P = P_ion+ P_ele+P_rad + P_correction<br>
> <br>
> My par file has :<br>
> eosMode : dens_ie_recal_gather<br>
> eosInitMode : dens_temp_gather<br>
> <br>
> I am having hard time finding the locations within the eos routines where I make all these modifications. I would really appreciate any help.<br>
<br>
<br>
It looks like you are working with the right file, (a copy of) <br>
physics/Eos/EosMain/multiTemp/Gamma/Ye/eos_idealGamma3T.F90 .<br>
<br>
I will point to the code in that file that should be of most importance <br>
for you. (There are many other places in that file that should be <br>
modified for consistency, but they should not be reached in the courser of <br>
execution, as long as you stick with using 3T Multitype Eos and the eos <br>
modes quoted above.)<br>
<br>
Note that all code I will point to is AFTER the LAST occurrence of<br>
<br>
| select case (mode)<br>
(about l. 635)<br>
<br>
<br>
1. the section after<br>
| case (MODE_DENS_TEMP_ION)<br>
(about l. 648)<br>
<br>
2. the section after<br>
| case (MODE_DENS_TEMP_ELE)<br>
(about l. 663)<br>
(Maybe not, if your offset only applies to ions.)<br>
<br>
3. the following sections will probably also need modifications, after about l. 1121:<br>
| if(mask(EOS_DET))then<br>
...<br>
<br>
| if(mask(EOS_CV))then<br>
...<br>
<br>
| if(mask(EOS_CVION))then<br>
...<br>
<br>
| if(mask(EOS_CVELE))then<br>
(Maybe not, if your offset only applies to ions.)<br>
...<br>
<br>
<br>
This should get you started. There may be other places that need changes.<br>
I make no claims that this will actually work.<br>
<br>
<br>
The above basically only addresses part 1) of your question.<br>
For part 2), <br>
1. You need to make sure the Eos returns the GAMC you need<br>
(Testing and maybe further Eos code changes will be needed), and<br>
2. you need a customized Hydro_computeDt.F90 .<br>
<br>
<br>
If either one of your pressures or one of your energies goes down to<br>
zero or below anywhere, you may be in trouble anyway. Various places<br>
in the implementation of Hydro, in particular, may fail when that<br>
happens.<br>
<br>
<br>
Klaus<br>
</div>
</span></font></div>
</body>
</html>