[Getdp] Complex -> time step coupling : cannot access to real part of field (bug ?)

Gilles Vogt vogtgilles at gmail.com
Fri Mar 20 11:53:46 CET 2015


Hi,

I am still working on induction heating 2D coupled problems. My input file
is written at the end of this email. As you can see, I solve in complex
values the magnetic problem, and use the power from induced currents as
heating power.
The power is calculated from this code :
-sigma[]*((Re[{ur}]-Im[w*{a}])*(Re[{ur}]-Im[w*{a}]) +
(Im[{ur}]+Re[w*{a}])*(Im[{ur}]+Re[w*{a}]))
Where ur is the scalar electric potential, w=2*pi*f, a the magnetic vector
potential.
It outputs the correct value when post-processed inside a "NameOfFormulation
Magnetodynamics_av_2D" section. However, when post-processed inside a
"NameOfFormulation
Thermics" section, it outputs only the power from imaginary currents.

A full model is attached to this email. You can check that :
therm_OhmicL and therm_OhmicL2 give the same results
therm_qv gives different results (the formula is the same as therm_OhmicL2
but within the coupled problem).

I have been able to confirm that this problem also occurs while solving the
problem (the input power is only relative to the imaginary part of
currents), and not only in post-pro.

My guess is : in the time-step model, real and imaginary part of the
complex fields are seen as t0 and t1 steps, and only t1 is considered.

I hope someone can confirm the issue, or give me a workaround.

Best regards,


Here is my .pro file :
Formulation {
  { Name Magnetodynamics_av_2D; Type FemEquation;
    Quantity {
      { Name a ; Type Local ; NameOfSpace Hcurl_a_Mag_2D; }
      { Name ur; Type Local ; NameOfSpace Hregion_u_Mag_2D; }
      { Name I ; Type Global; NameOfSpace Hregion_u_Mag_2D [I]; }
      { Name U ; Type Global; NameOfSpace Hregion_u_Mag_2D [U]; }
      { Name js; Type Local ; NameOfSpace Hregion_j_Mag_2D; }
    }
    Equation {
      Galerkin { [ nu[{d a}] * Dof{d a} , {d a} ]; In Domain_Mag;
                 Jacobian Vol; Integration CurlCurl; }

      Galerkin { JacNL [ dhdb_NL[{d a}] * Dof{d a} , {d a} ] ;
                In DomainNL ; Jacobian Vol ; Integration I1 ; }

      Galerkin { DtDof [ sigma[] * Dof{a} , {a} ]; In DomainC_Mag;
                 Jacobian Vol; Integration CurlCurl; }

      Galerkin { [ sigma[] * Dof{ur} , {a} ]; In DomainC_Mag;
                 Jacobian Vol; Integration CurlCurl; }

      Galerkin { [ - Dof{js} , {a} ]; In DomainS_Mag;
                 Jacobian Vol;
                 Integration CurlCurl; }

      Galerkin { DtDof [ sigma[] * Dof{a} , {ur} ]; In DomainC_Mag;
                 Jacobian Vol; Integration CurlCurl; }
      Galerkin { [ sigma[] * Dof{ur} , {ur} ]; In DomainC_Mag;
                 Jacobian Vol; Integration CurlCurl; }
      // GlobalTerm { [ Dof{I} , {U} ]; In DomainC_Mag; }
    }
  }


  { Name TheDyn; Type FemEquation;
    Quantity {
      { Name t; Type Local; NameOfSpace Hgrad_T; }
      { Name a ; Type Local ; NameOfSpace Hcurl_a_Mag_2D; }
      { Name ur; Type Local ; NameOfSpace Hregion_u_Mag_2D; }
    }
    Equation {
      Galerkin { [ lambda[] * Dof{d t} , {d t} ]; In Omega_c; Integration
CurlCurl; Jacobian Vol;  }

      Galerkin { DtDof [ rho[]*c[] * Dof{t} , {t} ]; In Omega_c;
Integration CurlCurl; Jacobian Vol;  }

      Galerkin { [ -sigma[]*((Re[{ur}]-Im[w*{a}])*(Re[{ur}]-Im[w*{a}]) +
(Im[{ur}]+Re[w*{a}])*(Im[{ur}]+Re[w*{a}]))  , {t} ];
      In Omega_c2; Integration CurlCurl; Jacobian Vol;  }

      Galerkin { [ -qVol[]  , {t} ];
      In DomainS_Mag; Integration CurlCurl; Jacobian Vol;  }

      Galerkin { [ hS[]*Dof{t} , {t} ] ;In BdExt; Jacobian Sur ;
Integration CurlCurl ; }

      Galerkin { [ -hS[]*AmbT[] , {t} ] ; In BdExt ; Jacobian Sur ;
Integration CurlCurl ; }
    }
  }
}

Resolution {
  { Name TheDyn;
    System {
      { Name T; NameOfFormulation TheDyn; }
      { Name B; NameOfFormulation Magnetodynamics_av_2D;
         Type ComplexValue; Frequency Freq;}
    }
    Operation {
      InitSolution[B];
      IterativeLoop[Nb_max_iter, stop_criterion,
relaxation_factor]{GenerateJac[B] ; SolveJac[B] ;}
      SaveSolution[B];
      InitSolution[T]; SaveSolution[T];
      TimeLoopTheta[time0t, time1t, dtimet, theta] {
    Generate[T]; Solve[T];
    SaveSolution[T];
    }
    }
    }

}

--
Gilles VOGT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/getdp/attachments/20150320/6287a238/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Therm.zip
Type: application/zip
Size: 164517 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/getdp/attachments/20150320/6287a238/attachment.zip>