<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div class="">Hi Andreas, </div>
<div class=""><br class="">
</div>
<div class="">As you have done, you must define:</div>
<div class="">- dummy regions for the diodes and include them in Diode_Cir;</div>
<div class="">- a resistance function that depends on the current {Iz} </div>
<div class="">
<blockquote type="cite" class=""><tt class=""><span class="" style="font-size: 12pt;">GlobalTerm { NeverDt[ Resistance[{Iz}] * Dof{Iz} , {Iz} ]; In Diode_Cir; }</span></tt></blockquote>
or the voltage (what you have done)</div>
<div class="">
<blockquote type="cite" class=""><tt class=""><span class="" style="font-size: 12pt;">GlobalTerm { NeverDt[ Resistance[{Uz}] * Dof{Iz} , {Iz} ]; In Diode_Cir; }</span></tt></blockquote>
<br class="">
</div>
<div class="">I’ve done it for the case with current:</div>
<div class="">
<div class="">Ron = 1e-1; // small resistance (diode in state 'on')</div>
<div class="">Roff = 1e5 ; // big resistance (diode in state 'off')</div>
<div class="">Resistance[Diode_Cir] = (($1 >= 0)? Ron : Roff) ;</div>
</div>
<div class=""><br class="">
</div>
<div class="">In this case, the voltage would be </div>
<div class="">UR[Diode_Cir] = Resistance[$1] * $1  ;</div>
<div class=""><br class="">
</div>
<div class="">In your case, the function for the resistance should be modified. </div>
<div class=""><br class="">
</div>
<div class="">After that you need to define the circuit with your diodes. For instance for a single bridge rectifier:</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">{ Name ElectricalCircuit ; Type Network ;</div>
<div class="">      Case Circuit {</div>
<div class="">        { Region Input ;  Branch {700, 800} ; }</div>
<div class="">        // diodes</div>
<div class="">        { Region D1 ; Branch {800, 1} ; }</div>
<div class="">        { Region D2 ; Branch {700, 1} ; }</div>
<div class="">        { Region D3 ; Branch {999, 800} ; }</div>
<div class="">        { Region D4 ; Branch {999, 700} ; }</div>
<div class=""><br class="">
</div>
<div class="">        { Region Crec ; Branch {2, 999}; }</div>
<div class="">        { Region Rload; Branch {2, 999}; }</div>
<div class=""><br class="">
</div>
<div class="">        // FE coil on DC side</div>
<div class="">          { Region Inductor ; Branch {1, 2} ; } </div>
<div class="">      }</div>
</div>
<div class="">}</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Hope that helps, </div>
<div class="">Ruth</div>
<br class="">
<div class="">
<div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
—<br class="">
Prof. Ruth V. Sabariego<br class="">
KU Leuven  <br class="">
Dept. Electrical Engineering ESAT/Electa, EnergyVille<br class="">
<a href="http://www.esat.kuleuven.be/electa" class="">http://www.esat.kuleuven.be/electa</a></div>
<div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<a href="http://www.energyville.be" class="">http://www.energyville.be</a></div>
<div style="color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
</div>
<div style="color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Free software: <a href="http://gmsh.info" class="">http://gmsh.info</a> | <a href="http://getdp.info" class="">http://getdp.info</a> | <a href="http://onelab.info" class="">http://onelab.info</a><br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
</div>
</div>
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 17 Apr 2019, at 09:31, <a href="mailto:A.Eckert@eunda.ch" class="">
A.Eckert@eunda.ch</a> wrote:</div>
<br class="Apple-interchange-newline">
<div class=""><span style=" font-size:10pt;font-family:Arial" class="">Hello everyone</span><br class="">
<br class="">
<span style=" font-size:10pt;font-family:sans-serif" class="">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.</span><br class="">
<span style=" font-size:10pt;font-family:sans-serif" class="">In the example file
</span><span style=" font-size:12pt" class=""><b class="">Lib_Magnetodynamics2D_av_Cir.pro</b> </span><span style=" font-size:10pt;font-family:sans-serif" class="">(</span><a href="https://gitlab.onelab.info/getdp/getdp/blob/master/templates/Lib_Magnetodynamics2D_av_Cir.pro" class=""><span style=" font-size:10pt;color:blue;font-family:sans-serif" class="">https://gitlab.onelab.info/getdp/getdp/blob/master/templates/Lib_Magnetodynamics2D_av_Cir.pro</span></a><span style=" font-size:10pt;font-family:sans-serif" class="">),
 there's a hint/comment to use nonlinear resistors to simulate diodes.</span><br class="">
<span style=" font-size:10pt;font-family:sans-serif" class="">Unfortunately I coudln't find an exact example how to implement it.</span><br class="">
<br class="">
<span style=" font-size:10pt;font-family:sans-serif" class="">Following three lines are basically those related to the diodes out of the above example:</span><br class="">
<br class="">
<tt class=""><span style=" font-size:12pt" class="">Diode_Cir = Region[{}] ;</span></tt><span style=" font-size:12pt" class=""></span><br class="">
<br class="">
<tt class=""><span style=" font-size:12pt" class="">GlobalTerm { NeverDt[ Dof{Uz} , {Iz} ]; In Diode_Cir; }<br class="">
GlobalTerm { NeverDt[ Resistance[{Uz}] * Dof{Iz} , {Iz} ]; In Diode_Cir; }<br class="">
</span></tt><br class="">
<span style=" font-size:10pt;font-family:sans-serif" class="">According to my understanding, the definition of such a resistance is missing. I simplified the example to one diode.</span><br class="">
<span style=" font-size:10pt;font-family:sans-serif" class="">I added the regions and allocated it to the Diode_Cir.</span><br class="">
<br class="">
<tt class=""><span style=" font-size:12pt" class="">R_DIODE_1_A0 = Region[{1000012}];</span></tt><br class="">
<br class="">
<tt class=""><span style=" font-size:12pt" class="">Diode_Cir += Region[{R_DIODE_1_A0}];</span></tt><br class="">
<br class="">
<span style=" font-size:10pt;font-family:sans-serif" class="">In the last step, I set the dynamic resistance. In that case it's just the input voltage.</span><br class="">
<br class="">
<tt class=""><span style=" font-size:12pt" class="">Resistance[Region[{R_DIODE_1_A0}]] = $1</span></tt><br class="">
<br class="">
<span style=" font-size:10pt;font-family:sans-serif" class="">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.</span><br class="">
<span style=" font-size:10pt;font-family:sans-serif" class="">So there's probably still a mistake in the dynamic resistance calculation.</span><br class="">
<br class="">
<span style=" font-size:10pt;font-family:sans-serif" class="">Any help is highly appreciated. Thank you very much.</span><br class="">
<br class="">
<span style=" font-size:10pt;font-family:Arial" class="">Mit freundlichen Grüssen</span><br class="">
<br class="">
<span style=" font-size:10pt;font-family:Arial" class="">Andreas Eckert</span><br class="">
<span style=" font-size:10pt;font-family:Arial" class="">Forschung und Entwicklung / Research and Development<br class="">
</span><span style=" font-size:10pt;font-family:Courier New" class="">----------------------------------------------------</span><span style=" font-size:10pt;font-family:Arial" class=""><br class="">
e+a  Elektromaschinen und Antriebe AG<br class="">
Bachstrasse 10<br class="">
CH-4313 Möhlin<br class="">
</span><span style=" font-size:10pt;font-family:Courier New" class="">----------------------------------------------------</span><span style=" font-size:10pt;font-family:Arial" class=""><br class="">
Phone +41 61 855 92 84<br class="">
Fax     +41 61 855 92 99<br class="">
Mail <a href="mailto:a.eckert@e-und-a.ch" class="">a.eckert@e-und-a.ch</a><br class="">
</span><br class="">
<a href="http://www.e-und-a.ch/" class=""><span style=" font-size:10pt;font-family:Arial" class="">http://www.e-und-a.ch</span></a><br class="">
<span style=" font-size:10pt;font-family:Courier New" class="">----------------------------------------------------</span><br class="">
<br class="">
<span style=" font-size:10pt;font-family:sans-serif" class="">CONFIDENTIALITY NOTICE <br class="">
This communication and the information it contains is<br class="">
intended for the person(s) or organisation(s) named <br class="">
above and no other person(s) or organisation(s) and <br class="">
may be confidential, legally privileged and protected<br class="">
by law. Unauthorised use, copying or disclosure of any<br class="">
of it may be unlawful. If you have received this <br class="">
communication in error, please contact us immediately <br class="">
by email, telephone or facsimile. We will be happy to<br class="">
accept a reversed charge call (call collect). </span><font face="sans-serif" class=""><br class="">
<b class=""><size="1" class="">CONFIDENTIALITY NOTICE</size="1"></b><br class="">
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 class="">
Unauthorised use, copying or disclosure of any of it may be unlawful. If you have received this communication in error, please contact us immediately by email, telephone or facsimile. We will be happy to accept a reversed charge call (call collect).</font>_______________________________________________<br class="">
getdp mailing list<br class="">
<a href="mailto:getdp@onelab.info" class="">getdp@onelab.info</a><br class="">
http://onelab.info/mailman/listinfo/getdp<br class="">
</div>
</blockquote>
</div>
<br class="">
</body>
</html>