<span style=" font-size:10pt;font-family:Arial">Hi Ruth,</span><br><br><span style=" font-size:10pt;font-family:sans-serif">thank you very
much. That indeed helped a lot.</span><br><br><span style=" font-size:10pt;font-family:sans-serif">My idea was to
us an e-function, or an inverse e-function respectively, to approximate
the two axis of an ideal diode and keep the function continuously differentiable.</span><br><br><span style=" font-size:10pt;font-family:sans-serif">Resistance[Region[{R_DIODE_1}]]
= 1.0 / (Exp[\$1]);</span><br><br><span style=" font-size:10pt;font-family:sans-serif">By replacing that
line through your resistance definition</span><br><span style=" font-size:10pt;font-family:sans-serif">(Resistance[Region[{R_DIODE_1}]]
= ((\$1 >= 0)? Ron : Roff) ;)</span><br><span style=" font-size:10pt;font-family:sans-serif">everything works
perfectly. I can't tell you, why my original idea doesn't work.</span><br><br><span style=" font-size:10pt;font-family:sans-serif">Thank you.</span><br><br><br><br><span style=" font-size:10pt;font-family:sans-serif"> </span><br><br><br><span style=" font-size:9pt;font-family:Arial">"Ruth Vazquez Sabariego"
<ruth.sabariego@kuleuven.be> am 18.04.2019 15:33:37</span><br><table width=100% style="border-collapse:collapse;"><tr valign=top height=8><td width=5% style="border-style:none none none none;border-color:#808080;border-width:0px 0px 0px 0px;padding:0px 0px;"><span style=" font-size:9pt;color:#5f5f5f;font-family:Arial">Von:</span><td width=94% style="border-style:none none none none;border-color:#808080;border-width:0px 0px 0px 0px;padding:0px 0px;"><span style=" font-size:9pt;font-family:Arial">"Ruth
Vazquez Sabariego" <ruth.sabariego@kuleuven.be></span><tr valign=top height=8><td style="border-style:none none none none;border-color:#808080;border-width:0px 0px 0px 0px;padding:0px 0px;"><span style=" font-size:9pt;color:#5f5f5f;font-family:Arial">An:</span><td style="border-style:none none none none;border-color:#808080;border-width:0px 0px 0px 0px;padding:0px 0px;"><span style=" font-size:9pt;font-family:Arial">"a.eckert@e-und-a.ch"
<a.eckert@e-und-a.ch></span><tr valign=top height=8><td style="border-style:none none none none;border-color:#808080;border-width:0px 0px 0px 0px;padding:0px 0px;"><span style=" font-size:9pt;color:#5f5f5f;font-family:Arial">Cc:</span><td style="border-style:none none none none;border-color:#808080;border-width:0px 0px 0px 0px;padding:0px 0px;"><span style=" font-size:9pt;font-family:Arial">"getdp@onelab.info"
<getdp@onelab.info></span><tr valign=top height=8><td style="border-style:none none none none;border-color:#808080;border-width:0px 0px 0px 0px;padding:0px 0px;"><span style=" font-size:9pt;color:#5f5f5f;font-family:Arial">Date:</span><td style="border-style:none none none none;border-color:#808080;border-width:0px 0px 0px 0px;padding:0px 0px;"><span style=" font-size:9pt;font-family:Arial">18.04.2019
15:33 CEDT</span><tr valign=top height=8><td style="border-style:none none solid none;border-color:#808080;border-width:0px 0px 1px 0px;padding:0px 0px;"><span style=" font-size:9pt;color:#5f5f5f;font-family:Arial">Betreff:</span><td style="border-style:none none solid none;border-color:#808080;border-width:0px 0px 1px 0px;padding:0px 0px;"><span style=" font-size:9pt;font-family:Arial">Re:
[Getdp] GetDP - diode as non-linear resistant</span></table><br><br><br><span style=" font-size:12pt">Hi Andreas, </span><br><br><span style=" font-size:12pt">As you have done, you must define:</span><br><span style=" font-size:12pt">- dummy regions for the diodes and include
them in Diode_Cir;</span><br><span style=" font-size:12pt">- a resistance function that depends
on the current {Iz} </span><br><tt><span style=" font-size:12pt">GlobalTerm { NeverDt[ Resistance[{Iz}]
* Dof{Iz} , {Iz} ]; In Diode_Cir; }</span></tt><br><span style=" font-size:12pt">or the voltage (what you have done)</span><br><tt><span style=" font-size:12pt">GlobalTerm { NeverDt[ Resistance[{Uz}]
* Dof{Iz} , {Iz} ]; In Diode_Cir; }</span></tt><br><br><span style=" font-size:12pt">I’ve done it for the case with current:</span><br><span style=" font-size:12pt">Ron = 1e-1; // small resistance (diode
in state 'on')</span><br><span style=" font-size:12pt">Roff = 1e5 ; // big resistance (diode
in state 'off')</span><br><span style=" font-size:12pt">Resistance[Diode_Cir] = ((\$1 >= 0)?
Ron : Roff) ;</span><br><br><span style=" font-size:12pt">In this case, the voltage would be </span><br><span style=" font-size:12pt">UR[Diode_Cir] = Resistance[\$1] * \$1  ;</span><br><br><span style=" font-size:12pt">In your case, the function for the resistance
should be modified. </span><br><br><span style=" font-size:12pt">After that you need to define the circuit
with your diodes. For instance for a single bridge rectifier:</span><br><br><span style=" font-size:12pt">{ Name ElectricalCircuit ; Type Network
;</span><br><span style=" font-size:12pt">      Case Circuit {</span><br><span style=" font-size:12pt">        { Region
Input ;  Branch {700, 800} ; }</span><br><span style=" font-size:12pt">        // diodes</span><br><span style=" font-size:12pt">        { Region
D1 ; Branch {800, 1} ; }</span><br><span style=" font-size:12pt">        { Region
D2 ; Branch {700, 1} ; }</span><br><span style=" font-size:12pt">        { Region
D3 ; Branch {999, 800} ; }</span><br><span style=" font-size:12pt">        { Region
D4 ; Branch {999, 700} ; }</span><br><br><span style=" font-size:12pt">        { Region
Crec ; Branch {2, 999}; }</span><br><span style=" font-size:12pt">        { Region
Rload; Branch {2, 999}; }</span><br><br><span style=" font-size:12pt">        // FE coil
on DC side</span><br><span style=" font-size:12pt">          {
Region Inductor ; Branch {1, 2} ; } </span><br><span style=" font-size:12pt">      }</span><br><span style=" font-size:12pt">}</span><br><br><br><span style=" font-size:12pt">Hope that helps, </span><br><span style=" font-size:12pt">Ruth</span><br><br><span style=" font-size:12pt">—<br>Prof. Ruth V. Sabariego<br>KU Leuven  <br>Dept. Electrical Engineering ESAT/Electa, EnergyVille</span><span style=" font-size:12pt;color:blue"><u><br></u></span><a href=http://www.esat.kuleuven.be/electa><span style=" font-size:12pt;color:blue"><u>http://www.esat.kuleuven.be/electa</u></span></a><br><a href=http://www.energyville.be/><span style=" font-size:12pt;color:blue"><u>http://www.energyville.be</u></span></a><br><br><span style=" font-size:12pt">Free software: </span><a href=http://gmsh.info/><span style=" font-size:12pt;color:blue"><u>http://gmsh.info</u></span></a><span style=" font-size:12pt">| </span><a href=http://getdp.info/><span style=" font-size:12pt;color:blue"><u>http://getdp.info</u></span></a><span style=" font-size:12pt">| </span><a href=http://onelab.info/><span style=" font-size:12pt;color:blue"><u>http://onelab.info</u></span></a><span style=" font-size:12pt"><br><br><br><br><br><br></span><br><br><span style=" font-size:12pt">On 17 Apr 2019, at 09:31, </span><a href=mailto:A.Eckert@eunda.ch><span style=" font-size:12pt;color:blue"><u>A.Eckert@eunda.ch</u></span></a><span style=" font-size:12pt">wrote:</span><br><br><span style=" font-size:10pt">Hello everyone</span><span style=" font-size:12pt"><br></span><span style=" font-size:10pt;font-family:sans-serif"><br>I currently try enlarge the machine model to include external connections.
On of the aims is to model a 3-phased diode rectifier (B6-Bridge) which
uses 6 diodes to rectify the incoming waveforms.<br>In the example file </span><span style=" font-size:12pt"><b>Lib_Magnetodynamics2D_av_Cir.pro</b></span><span style=" font-size:10pt;font-family:sans-serif">(</span><a href=https://gitlab.onelab.info/getdp/getdp/blob/master/templates/Lib_Magnetodynamics2D_av_Cir.pro><span style=" font-size:10pt;color:blue;font-family:sans-serif"><u>https://gitlab.onelab.info/getdp/getdp/blob/master/templates/Lib_Magnetodynamics2D_av_Cir.pro</u></span></a><span style=" font-size:10pt;font-family:sans-serif">),
there's a hint/comment to use nonlinear resistors to simulate diodes.<br>Unfortunately I coudln't find an exact example how to implement it.</span><span style=" font-size:12pt"><br></span><span style=" font-size:10pt;font-family:sans-serif"><br>Following three lines are basically those related to the diodes out of
the above example:</span><span style=" font-size:12pt"><br></span><tt><span style=" font-size:12pt"><br>Diode_Cir = Region[{}] ;</span></tt><span style=" font-size:12pt"><br></span><tt><span style=" font-size:12pt"><br>GlobalTerm { NeverDt[ Dof{Uz} , {Iz} ]; In Diode_Cir; }<br>GlobalTerm { NeverDt[ Resistance[{Uz}] * Dof{Iz} , {Iz} ]; In Diode_Cir;
}</span></tt><span style=" font-size:12pt"><br></span><span style=" font-size:10pt;font-family:sans-serif"><br>According to my understanding, the definition of such a resistance is missing.
I simplified the example to one diode.<br>I added the regions and allocated it to the Diode_Cir.</span><span style=" font-size:12pt"><br></span><tt><span style=" font-size:12pt"><br>R_DIODE_1_A0 = Region[{1000012}];</span></tt><span style=" font-size:12pt"><br></span><tt><span style=" font-size:12pt"><br>Diode_Cir += Region[{R_DIODE_1_A0}];</span></tt><span style=" font-size:12pt"><br></span><span style=" font-size:10pt;font-family:sans-serif"><br>In the last step, I set the dynamic resistance. In that case it's just
the input voltage.</span><span style=" font-size:12pt"><br></span><tt><span style=" font-size:12pt"><br>Resistance[Region[{R_DIODE_1_A0}]] = \$1</span></tt><span style=" font-size:12pt"><br></span><span style=" font-size:10pt;font-family:sans-serif"><br>The program itself successfully finishes. But basically all values are
-nan, so something runs badly wrong. When I replace \$1 in the line above,
through a fix number (e.g. 10 ), the program behaves as it should.<br>So there's probably still a mistake in the dynamic resistance calculation.</span><span style=" font-size:12pt"><br></span><span style=" font-size:10pt;font-family:sans-serif"><br>Any help is highly appreciated. Thank you very much.</span><span style=" font-size:12pt"><br></span><span style=" font-size:10pt"><br>Mit freundlichen Grüssen</span><span style=" font-size:12pt"><br></span><span style=" font-size:10pt"><br>Andreas Eckert<br>Forschung und Entwicklung / Research and Development<br>----------------------------------------------------<br>e+a  Elektromaschinen und Antriebe AG<br>Bachstrasse 10<br>CH-4313 Möhlin<br>----------------------------------------------------<br>Phone +41 61 855 92 84<br>Fax     +41 61 855 92 99<br>Mail </span><a href="mailto:a.eckert@e-und-a.ch"><span style=" font-size:10pt;color:blue"><u>a.eckert@e-und-a.ch</u></span></a><span style=" font-size:12pt"><br></span><span style=" font-size:12pt;color:blue"><u><br></u></span><a href="http://www.e-und-a.ch/"><span style=" font-size:10pt;color:blue"><u>http://www.e-und-a.ch</u></span></a><span style=" font-size:10pt"><br>----------------------------------------------------</span><span style=" font-size:12pt"><br></span><span style=" font-size:10pt;font-family:sans-serif"><br>CONFIDENTIALITY NOTICE <br>This communication and the information it contains is<br>intended for the person(s) or organisation(s) named <br>above and no other person(s) or organisation(s) and <br>may be confidential, legally privileged and protected<br>by law. Unauthorised use, copying or disclosure of any<br>of it may be unlawful. If you have received this <br>communication in error, please contact us immediately <br>by email, telephone or facsimile. We will be happy to<br>accept a reversed charge call (call collect). </span><span style=" font-size:12pt;font-family:sans-serif"><b><br>CONFIDENTIALITY NOTICE</b><br>This communication and the information it contains is intended for the
person(s) or organisation(s) named above and no other person(s) or organisation(s)
and may be confidential, legally privileged and protected by law.<br>Unauthorised use, copying or disclosure of any of it may be unlawful. If