<div dir="ltr">Chris<div><br></div><div>What do you mean by "Boundary conditions are not applied"? What do you do at the boundaries? Are you using one-sided differencing there?</div><div><br></div><div>Given your description, I assume that all derivatives would be identically zero, that there would not even be a floating-point round-off error. Is that so? If not, why not?</div><div><br></div><div>Are you really setting the lapse to zero initially? It should be one for Minkowski, same as e.g. g_xx.</div><div><br></div><div>What happens if you choose a very small grid size (e.g. just 10 points) and compare the initial conditions between the Einstein Toolkit and the Python code? Are they identical? You would need to compare ASCII output and compare all the digits.</div><div><br></div><div>What happens if you take a single Euler time step? Are the values still all identical? Try to find out and which iteration the first grid point differs between the two codes.</div><div><br></div><div>-erik</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 13, 2022 at 9:59 PM Chris Stevens <<a href="mailto:chris.stevens@canterbury.ac.nz">chris.stevens@canterbury.ac.nz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Hi all,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
I've been having trouble implementing the BSSN equations, as given by CTGamma, in Python using the package COFFEE, which I am very familiar with:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<a href="https://gitlab.com/thebarista/coffee" id="gmail-m_5984039251753474632LPNoLPOWALinkPreview" target="_blank">https://gitlab.com/thebarista/coffee</a><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<a href="https://doi.org/10.1016/j.softx.2019.100283" rel="noreferrer noopener" title="Persistent link using digital object identifier" style="box-sizing:border-box;margin:0px;text-decoration:underline;color:rgb(255,108,0);word-break:break-word;font-family:NexusSans,Arial,Helvetica,"Lucida Sans Unicode","Microsoft Sans Serif","Segoe UI Symbol",STIXGeneral,"Cambria Math","Arial Unicode MS",sans-serif;font-size:14px" id="gmail-m_5984039251753474632LPNoLPOWALinkPreview_1" target="_blank">https://doi.org/10.1016/j.softx.2019.100283</a><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
The main comments are:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
-- For simplicity, I am starting with a 1+1 code (set 2/3 spatial derivatives to be exactly zero).</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
-- The 1+log slicing for the lapse and a zero shift.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
-- The "phi" conformal factor type </div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
-- <span style="color:rgb(0,0,0);background-color:rgb(255,255,255);display:inline">The evolution equations are written to Python by a very slight modification of the .m file in CTGEvolution. I've confirmed this .m file outputs the same
file that is in the src directory.</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="color:rgb(0,0,0);background-color:rgb(255,255,255);display:inline">-- The vanishing of the trace of A is enforced after each full timestep in the same way as CTGamma.</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="color:rgb(0,0,0);background-color:rgb(255,255,255);display:inline">-- Boundary conditions are not applied.</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="color:rgb(0,0,0);background-color:rgb(255,255,255);display:inline">-- Fourth order SBP operators that lean over toward the boundaries are used.</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="color:rgb(0,0,0);background-color:rgb(255,255,255);display:inline">-- Minkowski initial data with all fields zero except \gamma11/22/33.</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="color:rgb(0,0,0);background-color:rgb(255,255,255);display:inline">-- Euler step is used for time integration to easier compare between Python and the Einstein toolkit.</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="color:rgb(0,0,0);background-color:rgb(255,255,255);display:inline"><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="color:rgb(0,0,0);background-color:rgb(255,255,255);display:inline">This leads to a stable evolution in the Einstein toolkit with the attached .par file using a simple one patch Cartesian grid. However, in Python, I get that
fields diverge, starting at the boundaries and then propagating inward (including with RK4). This behaviour does not go away with higher resolution or reduced CFL. It is however, fixed completely by setting the second spatial derivative of \alpha to be exactly
zero. Trying many different SBP FD operators that have proved successful for other projects has not changed the behaviour. </span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="color:rgb(0,0,0);background-color:rgb(255,255,255);display:inline"><br>
</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
The COFFEE code has been used and tested in a variety of projects and so there should not be a problem here. Thus, the only thing I can think of, is that the Einstein toolkit is doing something that I am not realizing, that is helping it remain stable. Hopefully,
somebody on this mailing list might have an idea?<br>
<br>
Thanks in advance,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
Chris</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<div></div>
<br>
</div>
<div>
<div id="gmail-m_5984039251753474632Signature">
<div>
<div></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<table width="614">
<colgroup><col width="35"><col width="196"><col width="377"></colgroup>
<tbody>
<tr valign="top">
</tr>
</tbody>
</table>
<table width="614">
<tbody>
<tr valign="top">
<td style="background-color:rgb(204,0,17)" width="35" height="252">
<div style="margin-bottom:9.44882px;line-height:115%;background-color:transparent;margin-top:16px">
<img style="width: 34px; height: 223px; max-width: 100%;" width="34" height="223" src="cid:180c08545639cddf49f1"><br>
</div>
</td>
<td style="background-color:rgb(204,0,17)" width="196">
<p style="margin-bottom:0.03cm;line-height:115%;background-color:transparent;margin-right:0.03cm;margin-top:0.03cm">
</p>
<p style="margin-bottom:0.03cm;line-height:115%;background-color:transparent;margin-right:0.03cm;margin-top:0.03cm">
</p>
<div style="text-align:center;margin-bottom:1.13386px;line-height:115%;background-color:transparent;margin-right:0.03cm;margin-top:1.13386px">
<br>
</div>
<div style="text-align:center;margin-bottom:1.13386px;line-height:115%;background-color:transparent;margin-right:0.03cm;margin-top:1.13386px">
<br>
</div>
<div style="text-align:center;margin-bottom:1.13386px;line-height:115%;background-color:transparent;margin-right:0.03cm;margin-top:1.13386px">
<img style="width: 133px; height: 101px; max-width: 100%;" width="133" height="101" src="cid:180c085456481d7e37e2"><br>
</div>
<p style="margin-bottom:0.25cm;line-height:115%;background-color:transparent;margin-right:0.03cm;margin-top:0.03cm">
<br>
</p>
</td>
<td style="background-color:rgb(231,230,230)" width="377">
<p style="margin-bottom:0.03cm;line-height:115%;background-color:transparent;margin-right:0.03cm;margin-top:0.03cm">
<br>
</p>
<p style="margin-bottom:0.03cm;line-height:115%;background-color:transparent;margin-right:0.03cm;margin-top:0.03cm">
<font face="Helvetica, serif"><span style="font-size:12px"><b>Dr Chris Stevens</b></span></font></p>
<p style="margin-bottom:0.03cm;line-height:115%;background-color:transparent;margin-right:0.03cm;margin-top:0.03cm">
<font face="Helvetica, serif"><font style="font-size:9pt" size="2"><b>Lecturer in Applied Mathematics</b></font></font></p>
<p style="margin-bottom:0.03cm;line-height:115%;background-color:transparent;margin-right:0.03cm;margin-top:0.03cm">
<font face="Helvetica, serif"><span style="font-size:12px">Rm 602, Jack Erskine building</span></font></p>
<p style="margin-bottom:0.03cm;line-height:115%;background-color:transparent;margin-right:0.03cm;margin-top:0.03cm">
<font face="Helvetica, serif"><font style="font-size:9pt" size="2">School of Mathematics and Statistics</font></font></p>
<p style="margin-bottom:0.03cm;line-height:115%;background-color:transparent;margin-right:0.03cm;margin-top:0.03cm">
<font face="Helvetica, serif"><font style="font-size:9pt" size="2">T: +64 3 369 0396 (Internal 90396)</font></font></p>
<p style="margin-bottom:0.03cm;line-height:115%;background-color:transparent;margin-right:0.03cm;margin-top:0.03cm">
<font face="Helvetica, serif"><font style="font-size:9pt" size="2">University of Canterbury | Te Whare Wānanga o Waitaha</font></font></p>
<p style="margin-bottom:0.03cm;line-height:115%;background-color:transparent;margin-right:0.03cm;margin-top:0.03cm">
<font face="Helvetica, serif"><font style="font-size:9pt" size="2">Private Bag 4800, Christchurch 8140, New Zealand</font></font></p>
<p style="margin-bottom:0.03cm;line-height:115%;background-color:transparent;margin-right:0.03cm;margin-top:0.03cm" align="left">
<font face="Helvetica, serif"><font style="font-size:9pt" size="2"><a href="http://www.chrisdoesmaths.com/" target="_blank">http://www.chrisdoesmaths.com</a><br>
<br>
</font></font></p>
<p style="margin-bottom:0cm;line-height:115%;background-color:transparent"><span style="font-size:9pt;font-family:Helvetica,sans-serif;background-color:transparent;color:rgb(0,0,0)"><b>Director</b><br>
</span><span style="background-color:transparent;font-family:Helvetica,sans-serif;font-size:9pt">SCRI Ltd<br>
</span><a href="http://www.scri.co.nz/" style="background-color:transparent" target="_blank"><font face="Helvetica, sans-serif"><font style="font-size:9pt">http://www.scri.co.nz</font></font></a></p>
</td>
</tr>
</tbody>
</table>
<br>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@einsteintoolkit.org" target="_blank">Users@einsteintoolkit.org</a><br>
<a href="http://lists.einsteintoolkit.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.einsteintoolkit.org/mailman/listinfo/users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Erik Schnetter <<a href="mailto:schnetter@gmail.com" target="_blank">schnetter@gmail.com</a>></div><div><a href="http://www.perimeterinstitute.ca/personal/eschnetter/" target="_blank">http://www.perimeterinstitute.ca/personal/eschnetter/</a><br></div><div><br></div></div></div></div></div>