<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">There is nothing wrong with the option
      '-restart' or the file 'machine_magstadyn_a.pro', I just need to
      smooth things down with inductive circuits...<br>
      <br>
      Altough the current is a bit hairy, the results are more than good
      :<br>
      ( no scales to avoid problems)<br>
      <img moz-do-not-send="false"
        src="cid:part1.39B89803.6E93B105@voo.be" alt="" height="600"
        width="900"><br>
      <br>
      Joseph<br>
      <br>
      Le 4/04/2018 à 12:16, Joseph Frippiat a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:d8564597-b5b2-cf9e-c1a6-8f06b1eb652e@voo.be">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div class="moz-cite-prefix">For the restarts, I don't do a
        SaveSolution after the InitSolution.<br>
        <br>
        My simulation is inspired by the HeatReservoir example on the
        old wiki.<br>
        I use the same principle: a bash script exchanging data with
        getdp through a .pro file and restarting the simulation as
        needed.<br>
        <br>
        By mimicking the example, I'd  modified the file
        machine_magstadyn_a.pro like this for the restart:<br>
        <br>
            Operation {<br>
              If(par_batch==0) // start of the simulation<br>
               ...<br>
              Else             // restarts<br>
               InitSolution[A];<br>
               //ReadSolution[A]; // redundant => warnings
        "Prematured end of file"<br>
        <br>
               InitSolution[M];<br>
               //ReadSolution[M]; // redundant => warnings
        "Prematured end of file"<br>
        <br>
               InitSolution[T];<br>
               //ReadSolution[T]; // redundant => warnings
        "Prematured end of file"<br>
        <br>
               ...<br>
              EndIf // If(par_batch==0)<br>
              <br>
              ...<br>
        <br>
        As in the example, for the restarts, I was also calling
        ReadSolution (which caused problems) until Christophe has shown
        me that it was not necessary.<br>
        <br>
        I have only discontinuities for the system A (electromagnetical
        one) but not for de Mechanical one and not for the Thermal one.<br>
        <br>
        Joseph<br>
        <br>
        Le 4/04/2018 à 10:03, Ruth Vazquez Sabariego a écrit :<br>
      </div>
      <blockquote type="cite"
        cite="mid:88432305-A24E-4D3A-B4F5-AAFFDB95DA20@kuleuven.be">
        <meta http-equiv="Content-Type" content="text/html;
          charset=utf-8">
        <div class="">Having a look at “machine_magstadyn_a.pro”, I
          think that the problem may come from SaveSolution. </div>
        <div class="">You have: </div>
        <div class="">
          <div style="margin: 0px; font-stretch: normal; font-size:
            11px; line-height: normal; font-family: Monaco;
            background-color: rgba(255, 255, 255, 0.8);" class=""> <span
              style="font-variant-ligatures: no-common-ligatures"
              class="">InitSolution[A];</span></div>
          <div style="margin: 0px; font-stretch: normal; font-size:
            11px; line-height: normal; font-family: Monaco;
            background-color: rgba(255, 255, 255, 0.8);" class=""> <span
              style="font-variant-ligatures: no-common-ligatures"
              class="">SaveSolution[A];</span></div>
        </div>
        <div class=""><br class="">
        </div>
        <div class="">InitSolution takes the data from your res file.</div>
        <div class="">SaveSolution saves the current solution, which is
          not yet computed, thus zero. </div>
        <div class=""><br class="">
        </div>
        <div class="">Can you try by commenting it out: </div>
        <div class="">//<span style="font-family: Monaco; font-size:
            11px; background-color: rgba(255, 255, 255, 0.8);" class="">SaveSolution[A];</span></div>
        <div class=""><br class="">
        </div>
        <div class="">Let me know if that solves the issue. </div>
        <div class=""><br class="">
        </div>
        <div class="">Best,</div>
        <div class="">Ruth</div>
        <div class=""><br class="">
        </div>
        <div class=""><br class="">
        </div>
        <br class="">
        <div><br class="">
          <blockquote type="cite" class="">
            <div class="">On 3 Apr 2018, at 20:57, Joseph Frippiat <<a
                href="mailto:joseph_frippiat@voo.be" class=""
                moz-do-not-send="true">joseph_frippiat@voo.be</a>>
              wrote:</div>
            <br class="Apple-interchange-newline">
            <div class="">
              <div text="#000000" bgcolor="#FFFFFF" class="">
                <div class="moz-cite-prefix">Ruth,<br class="">
                  <br class="">
                  yes, the discontinuities coincide with the restart:
                  the value of the first point after a restart is not
                  correct for the current.<br class="">
                  <br class="">
                  For the simulation, I use a modified version of
                  machine_magstadyn_a.pro.  The current is the current
                  in the circuit connected to the stator coils (which is
                  in fact another rotor...)<br class="">
                  <br class="">
                  For the restart, I do<br class="">
                  getdp model1 -restart -solve CoSimulation -bin -v 3<br
                    class="">
                  (the post-processing is called from the Resolution as
                  it is done in the original machine_magstadyn_a.pro)<br
                    class="">
                  <br class="">
                  No point seems to be missing as one can see in the log
                  :<br class="">
                  <br class="">
                  end of restart 1:<br class="">
                  <br class="">
                  ...<br class="">
                  Info    : Theta Time = 0.12008873 s (TimeStep 1094,
                  DTime 0.00010795)<br class="">
                  Info    : IterativeLoop converged (6 iterations,
                  residual 6.57266e-07)<br class="">
                  E n d   P r o c e s s i n g<br class="">
                  Info    : Stopped (Tue Apr  3 13:17:21 2018, Wall =
                  77.2714s, CPU = 261.174s, Mem = 38.8398Mb)<br class="">
                  <br class="">
                  beginning of restart 2:<br class="">
                  <br class="">
                  Info    : Started (Tue Apr  3 13:17:22 2018, Wall =
                  0.0200088s, CPU = 0.055353s, Mem = 4.40234Mb)<br
                    class="">
                  ...<br class="">
                  P r e - P r o c e s s i n g . . .<br class="">
                  Info    : System 1/3: 745 Dofs<br class="">
                  Info    : System 2/3: 4 Dofs<br class="">
                  Info    : System 3/3: 575 Dofs<br class="">
                  E n d   P r e - P r o c e s s i n g<br class="">
                  P r o c e s s i n g . . .<br class="">
                  Info    : Theta Time = 0.12019546 s (TimeStep 1095,
                  DTime 0.00010673)<br class="">
                  Info    : IterativeLoop converged (5 iterations,
                  residual 1.42442e-07)<br class="">
                  ...<br class="">
                  <br class="">
                  Joseph<br class="">
                  <br class="">
                  Le 3/04/2018 à 11:33, Ruth Vazquez Sabariego a écrit :<br
                    class="">
                </div>
                <blockquote type="cite"
                  cite="mid:51B27772-F2CB-4288-817B-AD3C044B0C4D@kuleuven.be"
                  class="">
                  <div class="">Hi Joseph, </div>
                  <div class=""><br class="">
                  </div>
                  <div class="">Do the discontinuities coincide with the
                    restart?</div>
                  <div class="">How are you doing the post-processing
                    for getting the current?</div>
                  <div class="">Does it behave in the same way if you do
                    post-pro straightaway or just after?</div>
                  <div class=""><br class="">
                  </div>
                  <div class="">I mean</div>
                  <div class="">getdp xxx.pro -restart -solve xxx -pos
                    xxx</div>
                  <div class="">OR</div>
                  <div class="">getdp  xxx.pro -restart -solve xxx</div>
                  <div class="">getdp xxx.pro -pos xxx</div>
                  <div class=""><br class="">
                  </div>
                  <div class="">The behaviour should be the same but it
                    could be that we are missing a time step…</div>
                  <div class="">I do not use restart often but when I do
                    I take the first option without observing any
                    particular weird behaviour.</div>
                  <div class=""><br class="">
                  </div>
                  <div class="">Best regards, </div>
                  <div class="">Ruth</div>
                  <div class=""><br class="">
                  </div>
                  <br class="">
                  <div class=""><br class="">
                    <blockquote type="cite" class="">
                      <div class="">On 3 Apr 2018, at 01:29, Joseph
                        Frippiat <<a
                          href="mailto:joseph_frippiat@voo.be" class=""
                          moz-do-not-send="true">joseph_frippiat@voo.be</a>>
                        wrote:</div>
                      <br class="Apple-interchange-newline">
                      <div class="">
                        <div text="#000000" bgcolor="#FFFFFF" class="">
                          <p class="">Hello,</p>
                          <p class="">as one can see on the following
                            picture, I get discontinuities each time I
                            restart my calculations with the -restart
                            option.</p>
                          <p class="">There is surely something that I
                            miss but I can't find it.</p>
                          <p class="">Did someone else encouter this
                            problem that could point me to a solution ?</p>
                          <p class="">Thanks in advance,</p>
                          <p class="">Joseph<br class="">
                          </p>
                          <p class="">Here is the picture:</p>
                          <span id="cid:part1.F745617A.ED39B51C@voo.be"
                            class=""><Figure 0.png></span> </div>
                        _______________________________________________<br
                          class="">
                        getdp mailing list<br class="">
                        <a href="mailto:getdp@onelab.info" class=""
                          moz-do-not-send="true">getdp@onelab.info</a><br
                          class="">
                        <a class="moz-txt-link-freetext"
                          href="http://onelab.info/mailman/listinfo/getdp"
                          moz-do-not-send="true">http://onelab.info/mailman/listinfo/getdp</a><br
                          class="">
                      </div>
                    </blockquote>
                  </div>
                  <br class="">
                </blockquote>
                <p class=""><br class="">
                </p>
              </div>
            </div>
          </blockquote>
        </div>
        <br class="">
      </blockquote>
      <p><br>
      </p>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>