skripta za izracun tem valovanja z metodo koncnih elementov

master
Andrej 2021-08-30 10:35:33 +02:00
commit d6e7153b84
50 changed files with 55473 additions and 0 deletions

View File

@ -0,0 +1,14 @@
r_zila = 0.5;
r_oklop = 3;
n_zila = 80;
n_oklop = 50;
SetFactory("OpenCASCADE");
Disk(1) = {1, 0, 0, r_zila, r_zila};
Disk(2) = {0, 0, 0, r_oklop, r_oklop};
BooleanDifference{ Surface{2}; Delete; }{ Surface{1}; Delete; }
Physical Surface("dielektrik", 1) = {2};
Physical Curve("zila", 2) = {1};
Physical Curve("oklop", 3) = {2};
Transfinite Curve {1} = n_zila Using Progression 1;
Transfinite Curve {2} = n_oklop Using Progression 1;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,14 @@
r_zila = 0.5;
r_oklop = 3;
n_zila = 80;
n_oklop = 40;
SetFactory("OpenCASCADE");
Disk(1) = {0, 0, 0, r_zila, r_zila};
Disk(2) = {0, 0, 0, r_oklop, r_oklop};
BooleanDifference{ Surface{2}; Delete; }{ Surface{1}; Delete; }
Physical Surface("dielektrik", 1) = {2};
Physical Curve("zila", 2) = {1};
Physical Curve("oklop", 3) = {2};
Transfinite Curve {1} = n_zila Using Progression 1;
Transfinite Curve {2} = n_oklop Using Progression 1;

2388
geometrija/koax.msh 100644

File diff suppressed because it is too large Load Diff

2265
geometrija/koax.xml 100644

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,14 @@
r_zila = 0.5;
r_oklop = 3;
n_zila = 80;
n_oklop = 10;
SetFactory("OpenCASCADE");
Disk(1) = {0, 0, 0, r_zila, r_zila};
Rectangle(2) = {-r_oklop/2, -r_oklop/2, 0, r_oklop, r_oklop, 0};
BooleanDifference{ Surface{2}; Delete; }{ Surface{1}; Delete; }
Physical Surface("dielektrik", 1) = {2};
Physical Curve("zila", 2) = {1};
Physical Curve("oklop", 3) = {3, 5, 4, 2};
Transfinite Curve {1} = n_zila Using Progression 1;
Transfinite Curve {3, 5, 4, 2} = n_oklop Using Progression 1;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,940 @@
<?xml version="1.0" encoding="UTF-8"?>
<dolfin xmlns:dolfin="http://fenicsproject.org">
<mesh_function type="uint" dim="2" size="935">
<entity index="0" value="1"/>
<entity index="1" value="1"/>
<entity index="2" value="1"/>
<entity index="3" value="1"/>
<entity index="4" value="1"/>
<entity index="5" value="1"/>
<entity index="6" value="1"/>
<entity index="7" value="1"/>
<entity index="8" value="1"/>
<entity index="9" value="1"/>
<entity index="10" value="1"/>
<entity index="11" value="1"/>
<entity index="12" value="1"/>
<entity index="13" value="1"/>
<entity index="14" value="1"/>
<entity index="15" value="1"/>
<entity index="16" value="1"/>
<entity index="17" value="1"/>
<entity index="18" value="1"/>
<entity index="19" value="1"/>
<entity index="20" value="1"/>
<entity index="21" value="1"/>
<entity index="22" value="1"/>
<entity index="23" value="1"/>
<entity index="24" value="1"/>
<entity index="25" value="1"/>
<entity index="26" value="1"/>
<entity index="27" value="1"/>
<entity index="28" value="1"/>
<entity index="29" value="1"/>
<entity index="30" value="1"/>
<entity index="31" value="1"/>
<entity index="32" value="1"/>
<entity index="33" value="1"/>
<entity index="34" value="1"/>
<entity index="35" value="1"/>
<entity index="36" value="1"/>
<entity index="37" value="1"/>
<entity index="38" value="1"/>
<entity index="39" value="1"/>
<entity index="40" value="1"/>
<entity index="41" value="1"/>
<entity index="42" value="1"/>
<entity index="43" value="1"/>
<entity index="44" value="1"/>
<entity index="45" value="1"/>
<entity index="46" value="1"/>
<entity index="47" value="1"/>
<entity index="48" value="1"/>
<entity index="49" value="1"/>
<entity index="50" value="1"/>
<entity index="51" value="1"/>
<entity index="52" value="1"/>
<entity index="53" value="1"/>
<entity index="54" value="1"/>
<entity index="55" value="1"/>
<entity index="56" value="1"/>
<entity index="57" value="1"/>
<entity index="58" value="1"/>
<entity index="59" value="1"/>
<entity index="60" value="1"/>
<entity index="61" value="1"/>
<entity index="62" value="1"/>
<entity index="63" value="1"/>
<entity index="64" value="1"/>
<entity index="65" value="1"/>
<entity index="66" value="1"/>
<entity index="67" value="1"/>
<entity index="68" value="1"/>
<entity index="69" value="1"/>
<entity index="70" value="1"/>
<entity index="71" value="1"/>
<entity index="72" value="1"/>
<entity index="73" value="1"/>
<entity index="74" value="1"/>
<entity index="75" value="1"/>
<entity index="76" value="1"/>
<entity index="77" value="1"/>
<entity index="78" value="1"/>
<entity index="79" value="1"/>
<entity index="80" value="1"/>
<entity index="81" value="1"/>
<entity index="82" value="1"/>
<entity index="83" value="1"/>
<entity index="84" value="1"/>
<entity index="85" value="1"/>
<entity index="86" value="1"/>
<entity index="87" value="1"/>
<entity index="88" value="1"/>
<entity index="89" value="1"/>
<entity index="90" value="1"/>
<entity index="91" value="1"/>
<entity index="92" value="1"/>
<entity index="93" value="1"/>
<entity index="94" value="1"/>
<entity index="95" value="1"/>
<entity index="96" value="1"/>
<entity index="97" value="1"/>
<entity index="98" value="1"/>
<entity index="99" value="1"/>
<entity index="100" value="1"/>
<entity index="101" value="1"/>
<entity index="102" value="1"/>
<entity index="103" value="1"/>
<entity index="104" value="1"/>
<entity index="105" value="1"/>
<entity index="106" value="1"/>
<entity index="107" value="1"/>
<entity index="108" value="1"/>
<entity index="109" value="1"/>
<entity index="110" value="1"/>
<entity index="111" value="1"/>
<entity index="112" value="1"/>
<entity index="113" value="1"/>
<entity index="114" value="1"/>
<entity index="115" value="1"/>
<entity index="116" value="1"/>
<entity index="117" value="1"/>
<entity index="118" value="1"/>
<entity index="119" value="1"/>
<entity index="120" value="1"/>
<entity index="121" value="1"/>
<entity index="122" value="1"/>
<entity index="123" value="1"/>
<entity index="124" value="1"/>
<entity index="125" value="1"/>
<entity index="126" value="1"/>
<entity index="127" value="1"/>
<entity index="128" value="1"/>
<entity index="129" value="1"/>
<entity index="130" value="1"/>
<entity index="131" value="1"/>
<entity index="132" value="1"/>
<entity index="133" value="1"/>
<entity index="134" value="1"/>
<entity index="135" value="1"/>
<entity index="136" value="1"/>
<entity index="137" value="1"/>
<entity index="138" value="1"/>
<entity index="139" value="1"/>
<entity index="140" value="1"/>
<entity index="141" value="1"/>
<entity index="142" value="1"/>
<entity index="143" value="1"/>
<entity index="144" value="1"/>
<entity index="145" value="1"/>
<entity index="146" value="1"/>
<entity index="147" value="1"/>
<entity index="148" value="1"/>
<entity index="149" value="1"/>
<entity index="150" value="1"/>
<entity index="151" value="1"/>
<entity index="152" value="1"/>
<entity index="153" value="1"/>
<entity index="154" value="1"/>
<entity index="155" value="1"/>
<entity index="156" value="1"/>
<entity index="157" value="1"/>
<entity index="158" value="1"/>
<entity index="159" value="1"/>
<entity index="160" value="1"/>
<entity index="161" value="1"/>
<entity index="162" value="1"/>
<entity index="163" value="1"/>
<entity index="164" value="1"/>
<entity index="165" value="1"/>
<entity index="166" value="1"/>
<entity index="167" value="1"/>
<entity index="168" value="1"/>
<entity index="169" value="1"/>
<entity index="170" value="1"/>
<entity index="171" value="1"/>
<entity index="172" value="1"/>
<entity index="173" value="1"/>
<entity index="174" value="1"/>
<entity index="175" value="1"/>
<entity index="176" value="1"/>
<entity index="177" value="1"/>
<entity index="178" value="1"/>
<entity index="179" value="1"/>
<entity index="180" value="1"/>
<entity index="181" value="1"/>
<entity index="182" value="1"/>
<entity index="183" value="1"/>
<entity index="184" value="1"/>
<entity index="185" value="1"/>
<entity index="186" value="1"/>
<entity index="187" value="1"/>
<entity index="188" value="1"/>
<entity index="189" value="1"/>
<entity index="190" value="1"/>
<entity index="191" value="1"/>
<entity index="192" value="1"/>
<entity index="193" value="1"/>
<entity index="194" value="1"/>
<entity index="195" value="1"/>
<entity index="196" value="1"/>
<entity index="197" value="1"/>
<entity index="198" value="1"/>
<entity index="199" value="1"/>
<entity index="200" value="1"/>
<entity index="201" value="1"/>
<entity index="202" value="1"/>
<entity index="203" value="1"/>
<entity index="204" value="1"/>
<entity index="205" value="1"/>
<entity index="206" value="1"/>
<entity index="207" value="1"/>
<entity index="208" value="1"/>
<entity index="209" value="1"/>
<entity index="210" value="1"/>
<entity index="211" value="1"/>
<entity index="212" value="1"/>
<entity index="213" value="1"/>
<entity index="214" value="1"/>
<entity index="215" value="1"/>
<entity index="216" value="1"/>
<entity index="217" value="1"/>
<entity index="218" value="1"/>
<entity index="219" value="1"/>
<entity index="220" value="1"/>
<entity index="221" value="1"/>
<entity index="222" value="1"/>
<entity index="223" value="1"/>
<entity index="224" value="1"/>
<entity index="225" value="1"/>
<entity index="226" value="1"/>
<entity index="227" value="1"/>
<entity index="228" value="1"/>
<entity index="229" value="1"/>
<entity index="230" value="1"/>
<entity index="231" value="1"/>
<entity index="232" value="1"/>
<entity index="233" value="1"/>
<entity index="234" value="1"/>
<entity index="235" value="1"/>
<entity index="236" value="1"/>
<entity index="237" value="1"/>
<entity index="238" value="1"/>
<entity index="239" value="1"/>
<entity index="240" value="1"/>
<entity index="241" value="1"/>
<entity index="242" value="1"/>
<entity index="243" value="1"/>
<entity index="244" value="1"/>
<entity index="245" value="1"/>
<entity index="246" value="1"/>
<entity index="247" value="1"/>
<entity index="248" value="1"/>
<entity index="249" value="1"/>
<entity index="250" value="1"/>
<entity index="251" value="1"/>
<entity index="252" value="1"/>
<entity index="253" value="1"/>
<entity index="254" value="1"/>
<entity index="255" value="1"/>
<entity index="256" value="1"/>
<entity index="257" value="1"/>
<entity index="258" value="1"/>
<entity index="259" value="1"/>
<entity index="260" value="1"/>
<entity index="261" value="1"/>
<entity index="262" value="1"/>
<entity index="263" value="1"/>
<entity index="264" value="1"/>
<entity index="265" value="1"/>
<entity index="266" value="1"/>
<entity index="267" value="1"/>
<entity index="268" value="1"/>
<entity index="269" value="1"/>
<entity index="270" value="1"/>
<entity index="271" value="1"/>
<entity index="272" value="1"/>
<entity index="273" value="1"/>
<entity index="274" value="1"/>
<entity index="275" value="1"/>
<entity index="276" value="1"/>
<entity index="277" value="1"/>
<entity index="278" value="1"/>
<entity index="279" value="1"/>
<entity index="280" value="1"/>
<entity index="281" value="1"/>
<entity index="282" value="1"/>
<entity index="283" value="1"/>
<entity index="284" value="1"/>
<entity index="285" value="1"/>
<entity index="286" value="1"/>
<entity index="287" value="1"/>
<entity index="288" value="1"/>
<entity index="289" value="1"/>
<entity index="290" value="1"/>
<entity index="291" value="1"/>
<entity index="292" value="1"/>
<entity index="293" value="1"/>
<entity index="294" value="1"/>
<entity index="295" value="1"/>
<entity index="296" value="1"/>
<entity index="297" value="1"/>
<entity index="298" value="1"/>
<entity index="299" value="1"/>
<entity index="300" value="1"/>
<entity index="301" value="1"/>
<entity index="302" value="1"/>
<entity index="303" value="1"/>
<entity index="304" value="1"/>
<entity index="305" value="1"/>
<entity index="306" value="1"/>
<entity index="307" value="1"/>
<entity index="308" value="1"/>
<entity index="309" value="1"/>
<entity index="310" value="1"/>
<entity index="311" value="1"/>
<entity index="312" value="1"/>
<entity index="313" value="1"/>
<entity index="314" value="1"/>
<entity index="315" value="1"/>
<entity index="316" value="1"/>
<entity index="317" value="1"/>
<entity index="318" value="1"/>
<entity index="319" value="1"/>
<entity index="320" value="1"/>
<entity index="321" value="1"/>
<entity index="322" value="1"/>
<entity index="323" value="1"/>
<entity index="324" value="1"/>
<entity index="325" value="1"/>
<entity index="326" value="1"/>
<entity index="327" value="1"/>
<entity index="328" value="1"/>
<entity index="329" value="1"/>
<entity index="330" value="1"/>
<entity index="331" value="1"/>
<entity index="332" value="1"/>
<entity index="333" value="1"/>
<entity index="334" value="1"/>
<entity index="335" value="1"/>
<entity index="336" value="1"/>
<entity index="337" value="1"/>
<entity index="338" value="1"/>
<entity index="339" value="1"/>
<entity index="340" value="1"/>
<entity index="341" value="1"/>
<entity index="342" value="1"/>
<entity index="343" value="1"/>
<entity index="344" value="1"/>
<entity index="345" value="1"/>
<entity index="346" value="1"/>
<entity index="347" value="1"/>
<entity index="348" value="1"/>
<entity index="349" value="1"/>
<entity index="350" value="1"/>
<entity index="351" value="1"/>
<entity index="352" value="1"/>
<entity index="353" value="1"/>
<entity index="354" value="1"/>
<entity index="355" value="1"/>
<entity index="356" value="1"/>
<entity index="357" value="1"/>
<entity index="358" value="1"/>
<entity index="359" value="1"/>
<entity index="360" value="1"/>
<entity index="361" value="1"/>
<entity index="362" value="1"/>
<entity index="363" value="1"/>
<entity index="364" value="1"/>
<entity index="365" value="1"/>
<entity index="366" value="1"/>
<entity index="367" value="1"/>
<entity index="368" value="1"/>
<entity index="369" value="1"/>
<entity index="370" value="1"/>
<entity index="371" value="1"/>
<entity index="372" value="1"/>
<entity index="373" value="1"/>
<entity index="374" value="1"/>
<entity index="375" value="1"/>
<entity index="376" value="1"/>
<entity index="377" value="1"/>
<entity index="378" value="1"/>
<entity index="379" value="1"/>
<entity index="380" value="1"/>
<entity index="381" value="1"/>
<entity index="382" value="1"/>
<entity index="383" value="1"/>
<entity index="384" value="1"/>
<entity index="385" value="1"/>
<entity index="386" value="1"/>
<entity index="387" value="1"/>
<entity index="388" value="1"/>
<entity index="389" value="1"/>
<entity index="390" value="1"/>
<entity index="391" value="1"/>
<entity index="392" value="1"/>
<entity index="393" value="1"/>
<entity index="394" value="1"/>
<entity index="395" value="1"/>
<entity index="396" value="1"/>
<entity index="397" value="1"/>
<entity index="398" value="1"/>
<entity index="399" value="1"/>
<entity index="400" value="1"/>
<entity index="401" value="1"/>
<entity index="402" value="1"/>
<entity index="403" value="1"/>
<entity index="404" value="1"/>
<entity index="405" value="1"/>
<entity index="406" value="1"/>
<entity index="407" value="1"/>
<entity index="408" value="1"/>
<entity index="409" value="1"/>
<entity index="410" value="1"/>
<entity index="411" value="1"/>
<entity index="412" value="1"/>
<entity index="413" value="1"/>
<entity index="414" value="1"/>
<entity index="415" value="1"/>
<entity index="416" value="1"/>
<entity index="417" value="1"/>
<entity index="418" value="1"/>
<entity index="419" value="1"/>
<entity index="420" value="1"/>
<entity index="421" value="1"/>
<entity index="422" value="1"/>
<entity index="423" value="1"/>
<entity index="424" value="1"/>
<entity index="425" value="1"/>
<entity index="426" value="1"/>
<entity index="427" value="1"/>
<entity index="428" value="1"/>
<entity index="429" value="1"/>
<entity index="430" value="1"/>
<entity index="431" value="1"/>
<entity index="432" value="1"/>
<entity index="433" value="1"/>
<entity index="434" value="1"/>
<entity index="435" value="1"/>
<entity index="436" value="1"/>
<entity index="437" value="1"/>
<entity index="438" value="1"/>
<entity index="439" value="1"/>
<entity index="440" value="1"/>
<entity index="441" value="1"/>
<entity index="442" value="1"/>
<entity index="443" value="1"/>
<entity index="444" value="1"/>
<entity index="445" value="1"/>
<entity index="446" value="1"/>
<entity index="447" value="1"/>
<entity index="448" value="1"/>
<entity index="449" value="1"/>
<entity index="450" value="1"/>
<entity index="451" value="1"/>
<entity index="452" value="1"/>
<entity index="453" value="1"/>
<entity index="454" value="1"/>
<entity index="455" value="1"/>
<entity index="456" value="1"/>
<entity index="457" value="1"/>
<entity index="458" value="1"/>
<entity index="459" value="1"/>
<entity index="460" value="1"/>
<entity index="461" value="1"/>
<entity index="462" value="1"/>
<entity index="463" value="1"/>
<entity index="464" value="1"/>
<entity index="465" value="1"/>
<entity index="466" value="1"/>
<entity index="467" value="1"/>
<entity index="468" value="1"/>
<entity index="469" value="1"/>
<entity index="470" value="1"/>
<entity index="471" value="1"/>
<entity index="472" value="1"/>
<entity index="473" value="1"/>
<entity index="474" value="1"/>
<entity index="475" value="1"/>
<entity index="476" value="1"/>
<entity index="477" value="1"/>
<entity index="478" value="1"/>
<entity index="479" value="1"/>
<entity index="480" value="1"/>
<entity index="481" value="1"/>
<entity index="482" value="1"/>
<entity index="483" value="1"/>
<entity index="484" value="1"/>
<entity index="485" value="1"/>
<entity index="486" value="1"/>
<entity index="487" value="1"/>
<entity index="488" value="1"/>
<entity index="489" value="1"/>
<entity index="490" value="1"/>
<entity index="491" value="1"/>
<entity index="492" value="1"/>
<entity index="493" value="1"/>
<entity index="494" value="1"/>
<entity index="495" value="1"/>
<entity index="496" value="1"/>
<entity index="497" value="1"/>
<entity index="498" value="1"/>
<entity index="499" value="1"/>
<entity index="500" value="1"/>
<entity index="501" value="1"/>
<entity index="502" value="1"/>
<entity index="503" value="1"/>
<entity index="504" value="1"/>
<entity index="505" value="1"/>
<entity index="506" value="1"/>
<entity index="507" value="1"/>
<entity index="508" value="1"/>
<entity index="509" value="1"/>
<entity index="510" value="1"/>
<entity index="511" value="1"/>
<entity index="512" value="1"/>
<entity index="513" value="1"/>
<entity index="514" value="1"/>
<entity index="515" value="1"/>
<entity index="516" value="1"/>
<entity index="517" value="1"/>
<entity index="518" value="1"/>
<entity index="519" value="1"/>
<entity index="520" value="1"/>
<entity index="521" value="1"/>
<entity index="522" value="1"/>
<entity index="523" value="1"/>
<entity index="524" value="1"/>
<entity index="525" value="1"/>
<entity index="526" value="1"/>
<entity index="527" value="1"/>
<entity index="528" value="1"/>
<entity index="529" value="1"/>
<entity index="530" value="1"/>
<entity index="531" value="1"/>
<entity index="532" value="1"/>
<entity index="533" value="1"/>
<entity index="534" value="1"/>
<entity index="535" value="1"/>
<entity index="536" value="1"/>
<entity index="537" value="1"/>
<entity index="538" value="1"/>
<entity index="539" value="1"/>
<entity index="540" value="1"/>
<entity index="541" value="1"/>
<entity index="542" value="1"/>
<entity index="543" value="1"/>
<entity index="544" value="1"/>
<entity index="545" value="1"/>
<entity index="546" value="1"/>
<entity index="547" value="1"/>
<entity index="548" value="1"/>
<entity index="549" value="1"/>
<entity index="550" value="1"/>
<entity index="551" value="1"/>
<entity index="552" value="1"/>
<entity index="553" value="1"/>
<entity index="554" value="1"/>
<entity index="555" value="1"/>
<entity index="556" value="1"/>
<entity index="557" value="1"/>
<entity index="558" value="1"/>
<entity index="559" value="1"/>
<entity index="560" value="1"/>
<entity index="561" value="1"/>
<entity index="562" value="1"/>
<entity index="563" value="1"/>
<entity index="564" value="1"/>
<entity index="565" value="1"/>
<entity index="566" value="1"/>
<entity index="567" value="1"/>
<entity index="568" value="1"/>
<entity index="569" value="1"/>
<entity index="570" value="1"/>
<entity index="571" value="1"/>
<entity index="572" value="1"/>
<entity index="573" value="1"/>
<entity index="574" value="1"/>
<entity index="575" value="1"/>
<entity index="576" value="1"/>
<entity index="577" value="1"/>
<entity index="578" value="1"/>
<entity index="579" value="1"/>
<entity index="580" value="1"/>
<entity index="581" value="1"/>
<entity index="582" value="1"/>
<entity index="583" value="1"/>
<entity index="584" value="1"/>
<entity index="585" value="1"/>
<entity index="586" value="1"/>
<entity index="587" value="1"/>
<entity index="588" value="1"/>
<entity index="589" value="1"/>
<entity index="590" value="1"/>
<entity index="591" value="1"/>
<entity index="592" value="1"/>
<entity index="593" value="1"/>
<entity index="594" value="1"/>
<entity index="595" value="1"/>
<entity index="596" value="1"/>
<entity index="597" value="1"/>
<entity index="598" value="1"/>
<entity index="599" value="1"/>
<entity index="600" value="1"/>
<entity index="601" value="1"/>
<entity index="602" value="1"/>
<entity index="603" value="1"/>
<entity index="604" value="1"/>
<entity index="605" value="1"/>
<entity index="606" value="1"/>
<entity index="607" value="1"/>
<entity index="608" value="1"/>
<entity index="609" value="1"/>
<entity index="610" value="1"/>
<entity index="611" value="1"/>
<entity index="612" value="1"/>
<entity index="613" value="1"/>
<entity index="614" value="1"/>
<entity index="615" value="1"/>
<entity index="616" value="1"/>
<entity index="617" value="1"/>
<entity index="618" value="1"/>
<entity index="619" value="1"/>
<entity index="620" value="1"/>
<entity index="621" value="1"/>
<entity index="622" value="1"/>
<entity index="623" value="1"/>
<entity index="624" value="1"/>
<entity index="625" value="1"/>
<entity index="626" value="1"/>
<entity index="627" value="1"/>
<entity index="628" value="1"/>
<entity index="629" value="1"/>
<entity index="630" value="1"/>
<entity index="631" value="1"/>
<entity index="632" value="1"/>
<entity index="633" value="1"/>
<entity index="634" value="1"/>
<entity index="635" value="1"/>
<entity index="636" value="1"/>
<entity index="637" value="1"/>
<entity index="638" value="1"/>
<entity index="639" value="1"/>
<entity index="640" value="1"/>
<entity index="641" value="1"/>
<entity index="642" value="1"/>
<entity index="643" value="1"/>
<entity index="644" value="1"/>
<entity index="645" value="1"/>
<entity index="646" value="1"/>
<entity index="647" value="1"/>
<entity index="648" value="1"/>
<entity index="649" value="1"/>
<entity index="650" value="1"/>
<entity index="651" value="1"/>
<entity index="652" value="1"/>
<entity index="653" value="1"/>
<entity index="654" value="1"/>
<entity index="655" value="1"/>
<entity index="656" value="1"/>
<entity index="657" value="1"/>
<entity index="658" value="1"/>
<entity index="659" value="1"/>
<entity index="660" value="1"/>
<entity index="661" value="1"/>
<entity index="662" value="1"/>
<entity index="663" value="1"/>
<entity index="664" value="1"/>
<entity index="665" value="1"/>
<entity index="666" value="1"/>
<entity index="667" value="1"/>
<entity index="668" value="1"/>
<entity index="669" value="1"/>
<entity index="670" value="1"/>
<entity index="671" value="1"/>
<entity index="672" value="1"/>
<entity index="673" value="1"/>
<entity index="674" value="1"/>
<entity index="675" value="1"/>
<entity index="676" value="1"/>
<entity index="677" value="1"/>
<entity index="678" value="1"/>
<entity index="679" value="1"/>
<entity index="680" value="1"/>
<entity index="681" value="1"/>
<entity index="682" value="1"/>
<entity index="683" value="1"/>
<entity index="684" value="1"/>
<entity index="685" value="1"/>
<entity index="686" value="1"/>
<entity index="687" value="1"/>
<entity index="688" value="1"/>
<entity index="689" value="1"/>
<entity index="690" value="1"/>
<entity index="691" value="1"/>
<entity index="692" value="1"/>
<entity index="693" value="1"/>
<entity index="694" value="1"/>
<entity index="695" value="1"/>
<entity index="696" value="1"/>
<entity index="697" value="1"/>
<entity index="698" value="1"/>
<entity index="699" value="1"/>
<entity index="700" value="1"/>
<entity index="701" value="1"/>
<entity index="702" value="1"/>
<entity index="703" value="1"/>
<entity index="704" value="1"/>
<entity index="705" value="1"/>
<entity index="706" value="1"/>
<entity index="707" value="1"/>
<entity index="708" value="1"/>
<entity index="709" value="1"/>
<entity index="710" value="1"/>
<entity index="711" value="1"/>
<entity index="712" value="1"/>
<entity index="713" value="1"/>
<entity index="714" value="1"/>
<entity index="715" value="1"/>
<entity index="716" value="1"/>
<entity index="717" value="1"/>
<entity index="718" value="1"/>
<entity index="719" value="1"/>
<entity index="720" value="1"/>
<entity index="721" value="1"/>
<entity index="722" value="1"/>
<entity index="723" value="1"/>
<entity index="724" value="1"/>
<entity index="725" value="1"/>
<entity index="726" value="1"/>
<entity index="727" value="1"/>
<entity index="728" value="1"/>
<entity index="729" value="1"/>
<entity index="730" value="1"/>
<entity index="731" value="1"/>
<entity index="732" value="1"/>
<entity index="733" value="1"/>
<entity index="734" value="1"/>
<entity index="735" value="1"/>
<entity index="736" value="1"/>
<entity index="737" value="1"/>
<entity index="738" value="1"/>
<entity index="739" value="1"/>
<entity index="740" value="1"/>
<entity index="741" value="1"/>
<entity index="742" value="1"/>
<entity index="743" value="1"/>
<entity index="744" value="1"/>
<entity index="745" value="1"/>
<entity index="746" value="1"/>
<entity index="747" value="1"/>
<entity index="748" value="1"/>
<entity index="749" value="1"/>
<entity index="750" value="1"/>
<entity index="751" value="1"/>
<entity index="752" value="1"/>
<entity index="753" value="1"/>
<entity index="754" value="1"/>
<entity index="755" value="1"/>
<entity index="756" value="1"/>
<entity index="757" value="1"/>
<entity index="758" value="1"/>
<entity index="759" value="1"/>
<entity index="760" value="1"/>
<entity index="761" value="1"/>
<entity index="762" value="1"/>
<entity index="763" value="1"/>
<entity index="764" value="1"/>
<entity index="765" value="1"/>
<entity index="766" value="1"/>
<entity index="767" value="1"/>
<entity index="768" value="1"/>
<entity index="769" value="1"/>
<entity index="770" value="1"/>
<entity index="771" value="1"/>
<entity index="772" value="1"/>
<entity index="773" value="1"/>
<entity index="774" value="1"/>
<entity index="775" value="1"/>
<entity index="776" value="1"/>
<entity index="777" value="1"/>
<entity index="778" value="1"/>
<entity index="779" value="1"/>
<entity index="780" value="1"/>
<entity index="781" value="1"/>
<entity index="782" value="1"/>
<entity index="783" value="1"/>
<entity index="784" value="1"/>
<entity index="785" value="1"/>
<entity index="786" value="1"/>
<entity index="787" value="1"/>
<entity index="788" value="1"/>
<entity index="789" value="1"/>
<entity index="790" value="1"/>
<entity index="791" value="1"/>
<entity index="792" value="1"/>
<entity index="793" value="1"/>
<entity index="794" value="1"/>
<entity index="795" value="1"/>
<entity index="796" value="1"/>
<entity index="797" value="1"/>
<entity index="798" value="1"/>
<entity index="799" value="1"/>
<entity index="800" value="1"/>
<entity index="801" value="1"/>
<entity index="802" value="1"/>
<entity index="803" value="1"/>
<entity index="804" value="1"/>
<entity index="805" value="1"/>
<entity index="806" value="1"/>
<entity index="807" value="1"/>
<entity index="808" value="1"/>
<entity index="809" value="1"/>
<entity index="810" value="1"/>
<entity index="811" value="1"/>
<entity index="812" value="1"/>
<entity index="813" value="1"/>
<entity index="814" value="1"/>
<entity index="815" value="1"/>
<entity index="816" value="1"/>
<entity index="817" value="1"/>
<entity index="818" value="1"/>
<entity index="819" value="1"/>
<entity index="820" value="1"/>
<entity index="821" value="1"/>
<entity index="822" value="1"/>
<entity index="823" value="1"/>
<entity index="824" value="1"/>
<entity index="825" value="1"/>
<entity index="826" value="1"/>
<entity index="827" value="1"/>
<entity index="828" value="1"/>
<entity index="829" value="1"/>
<entity index="830" value="1"/>
<entity index="831" value="1"/>
<entity index="832" value="1"/>
<entity index="833" value="1"/>
<entity index="834" value="1"/>
<entity index="835" value="1"/>
<entity index="836" value="1"/>
<entity index="837" value="1"/>
<entity index="838" value="1"/>
<entity index="839" value="1"/>
<entity index="840" value="1"/>
<entity index="841" value="1"/>
<entity index="842" value="1"/>
<entity index="843" value="1"/>
<entity index="844" value="1"/>
<entity index="845" value="1"/>
<entity index="846" value="1"/>
<entity index="847" value="1"/>
<entity index="848" value="1"/>
<entity index="849" value="1"/>
<entity index="850" value="1"/>
<entity index="851" value="1"/>
<entity index="852" value="1"/>
<entity index="853" value="1"/>
<entity index="854" value="1"/>
<entity index="855" value="1"/>
<entity index="856" value="1"/>
<entity index="857" value="1"/>
<entity index="858" value="1"/>
<entity index="859" value="1"/>
<entity index="860" value="1"/>
<entity index="861" value="1"/>
<entity index="862" value="1"/>
<entity index="863" value="1"/>
<entity index="864" value="1"/>
<entity index="865" value="1"/>
<entity index="866" value="1"/>
<entity index="867" value="1"/>
<entity index="868" value="1"/>
<entity index="869" value="1"/>
<entity index="870" value="1"/>
<entity index="871" value="1"/>
<entity index="872" value="1"/>
<entity index="873" value="1"/>
<entity index="874" value="1"/>
<entity index="875" value="1"/>
<entity index="876" value="1"/>
<entity index="877" value="1"/>
<entity index="878" value="1"/>
<entity index="879" value="1"/>
<entity index="880" value="1"/>
<entity index="881" value="1"/>
<entity index="882" value="1"/>
<entity index="883" value="1"/>
<entity index="884" value="1"/>
<entity index="885" value="1"/>
<entity index="886" value="1"/>
<entity index="887" value="1"/>
<entity index="888" value="1"/>
<entity index="889" value="1"/>
<entity index="890" value="1"/>
<entity index="891" value="1"/>
<entity index="892" value="1"/>
<entity index="893" value="1"/>
<entity index="894" value="1"/>
<entity index="895" value="1"/>
<entity index="896" value="1"/>
<entity index="897" value="1"/>
<entity index="898" value="1"/>
<entity index="899" value="1"/>
<entity index="900" value="1"/>
<entity index="901" value="1"/>
<entity index="902" value="1"/>
<entity index="903" value="1"/>
<entity index="904" value="1"/>
<entity index="905" value="1"/>
<entity index="906" value="1"/>
<entity index="907" value="1"/>
<entity index="908" value="1"/>
<entity index="909" value="1"/>
<entity index="910" value="1"/>
<entity index="911" value="1"/>
<entity index="912" value="1"/>
<entity index="913" value="1"/>
<entity index="914" value="1"/>
<entity index="915" value="1"/>
<entity index="916" value="1"/>
<entity index="917" value="1"/>
<entity index="918" value="1"/>
<entity index="919" value="1"/>
<entity index="920" value="1"/>
<entity index="921" value="1"/>
<entity index="922" value="1"/>
<entity index="923" value="1"/>
<entity index="924" value="1"/>
<entity index="925" value="1"/>
<entity index="926" value="1"/>
<entity index="927" value="1"/>
<entity index="928" value="1"/>
<entity index="929" value="1"/>
<entity index="930" value="1"/>
<entity index="931" value="1"/>
<entity index="932" value="1"/>
<entity index="933" value="1"/>
<entity index="934" value="1"/>
</mesh_function>
</dolfin>

View File

@ -0,0 +1,14 @@
r_zila = 0.5;
r_oklop = 3;
n_zila = 80;
n_oklop = 50;
SetFactory("OpenCASCADE");
Disk(1) = {0, 0, 0, r_zila, r_zila};
Disk(2) = {0, 0, 0, r_oklop, 0.5*r_oklop};
BooleanDifference{ Surface{2}; Delete; }{ Surface{1}; Delete; }
Physical Surface("dielektrik", 1) = {2};
Physical Curve("zila", 2) = {1};
Physical Curve("oklop", 3) = {2};
Transfinite Curve {1} = n_zila Using Progression 1;
Transfinite Curve {2} = n_oklop Using Progression 1;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,17 @@
w = 0.8e-3;
d = 32e-6;
h = 1.6e-3;
W = 5*w;
SetFactory("OpenCASCADE");
Rectangle(1) = {-w/2, 0, 0, w, d, 0};
Rectangle(2) = {-W/2, -h/2, 0, W, h, 0};
BooleanDifference{ Surface{2}; Delete; }{ Surface{1}; Delete; }
Physical Surface("dielektrik", 1) = {2};
Physical Curve("signal", 2) = {4, 3, 2, 1};
Physical Curve("gnd", 3) = {8, 5};
Physical Curve("strani", 4) = {6, 7};
Transfinite Curve {4, 2} = 5 Using Progression 1;
Transfinite Curve {3, 1} = 30 Using Progression 1;
Transfinite Curve {8, 5} = 50 Using Progression 1;
Transfinite Curve {6, 7} = 15 Using Progression 1;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,4 @@
$I$,1.587683737682743,A
$Z_0$,62.984836102152215,\ohm
$C$,85.01743830691181,pF\per\metre
$L$,337.2717935248947,nH\per\metre

View File

@ -0,0 +1,5 @@
velicina,FEM,analično,enote,napaka
$I$,1.4799117786125573,1.4864136437608977,A,-0.43741963588880184
$Z_0$,67.5715954458797,67.27602401911606,\ohm,0.439341401447334
$C$,79.25265419345939,79.1751819962321,pF\per\metre,0.0978490927005213
$L$,361.8613193411615,358.35189404068905,nH\per\metre,0.9793237761076143

View File

@ -0,0 +1,4 @@
$I$,2.25507989038385,A
$Z_0$,44.34432696882345,\ohm
$C$,120.7478854118662,pF\per\metre
$L$,237.44097645189865,nH\per\metre

View File

@ -0,0 +1,4 @@
$I$,2.0541699124167185,A
$Z_0$,48.681464661484895,\ohm
$C$,109.99576988969797,pF\per\metre
$L$,260.67732529965474,nH\per\metre

View File

@ -0,0 +1,4 @@
$I$,1.6176838349767209,A
$Z_0$,61.816776453996674,\ohm
$C$,88.9077872061038,pF\per\metre
$L$,339.7445587269718,nH\per\metre

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
slike/koax-E.pdf 100644

Binary file not shown.

BIN
slike/koax-H.pdf 100644

Binary file not shown.

BIN
slike/koax-V.pdf 100644

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

178
tem.py 100644
View File

@ -0,0 +1,178 @@
#!/usr/bin/python3
from fenics import *
import numpy as np
import matplotlib.pyplot as plt
from sys import argv
from scipy.constants import epsilon_0, mu_0
primeri = ('koax','izmaknjen','potlacen','kvadratni','stripline')
if argv[1] in primeri:
problem = argv[1]
else:
print('Neznan primer. Nadaljujem s koax.')
problem = 'koax'
shrani = True #spravi vse rezultate v fajle?
mreza = Mesh('geometrija/{}.xml'.format(problem))
domena = MeshFunction('size_t', mreza,
'geometrija/{}_physical_region.xml'.format(problem))
rob = MeshFunction('size_t', mreza,
'geometrija/{}_facet_region.xml'.format(problem))
dx = Measure('dx', domain=mreza, subdomain_data=domena)
ds = Measure('ds', domain=mreza, subdomain_data=rob)
V = FunctionSpace(mreza, 'P', 2)
napetost = 100
zila = DirichletBC(V, Constant(napetost), rob, 2)
oklop = DirichletBC(V, Constant(0), rob, 3)
r_pogoji = [zila, oklop]
eps_r = 2.55
u = TrialFunction(V)
v = TestFunction(V)
a = dot(grad(u), grad(v))*dx
L = Constant(0)*v*dx
u = Function(V)
solve(a == L, u, r_pogoji)
plot(mreza, linewidth=0.5)
p = plot(u)
cp = plt.colorbar(p)
cp.set_label('Elektricni potencial V (V)')
if shrani:
plt.savefig('slike/{}-V.pdf'.format(problem),bbox_inches='tight')
plt.show()
E = -grad(u)
plot(mreza, linewidth=0.5)
p = plot(E, zorder=3)
cp = plt.colorbar(p)
cp.set_label('Elektricno polje E (V/m)')
if shrani:
plt.savefig('slike/{}-E.pdf'.format(problem),bbox_inches='tight')
plt.show()
Z_w = np.sqrt(mu_0/epsilon_0/eps_r)
cross_z = lambda w: as_vector((-w[1],+w[0]))
H = cross_z(E)/Z_w
plot(mreza, linewidth=0.5)
p = plot(H, zorder=3)
cp = plt.colorbar(p)
cp.set_label('Magnetno polje H (A/m)')
if shrani:
plt.savefig('slike/{}-H.pdf'.format(problem),bbox_inches='tight')
plt.show()
nhat = FacetNormal(mreza)
cross_t = lambda w,x: w[0]*x[1]-w[1]*x[0]
k = cross_t(nhat, H)
tok = assemble(-k*ds(2))
Z0 = napetost/tok
C = epsilon_0*eps_r/napetost**2 * assemble(E**2 * dx(1))
L = mu_0/tok**2 * assemble(H**2 * dx(1))
print(tok, Z0, C, L)
if shrani:
with open('izracuni/{}-out.txt'.format(problem), 'w') as out:
out.write('$I$,{},A\n'.format(tok))
out.write('$Z_0$,{},\\ohm\n'.format(Z0))
out.write('$C$,{},pF\\per\\metre\n'.format(C*1e12))
out.write('$L$,{},nH\\per\\metre'.format(L*1e9))
# nadaljni del kode relevanten samo za koaksilani vod
# izračuna analitske vrednosti in jih za primer polj
# primerja z analitsko resitvijo
if problem == 'koax':
b = 3
a = 0.5
lg = np.log(b/a)
u_anal = lambda r: napetost/lg*np.log(r/a)
E_anal = lambda r: napetost/lg/r
H_anal = lambda r: E_anal(r)/Z_w
tok_anal = 2*np.pi*napetost/lg/Z_w
Z0_anal = 1/2/np.pi*Z_w*lg
C_anal = 2*np.pi*eps_r*epsilon_0/lg
L_anal = mu_0/2/np.pi*lg
print(tok_anal, tok)
print(Z0_anal, Z0)
print(C_anal, C)
print(L_anal, L)
if shrani:
with open('izracuni/{}-out.txt'.format(problem), 'w') as out:
out.write('velicina,FEM,analično,enote,napaka\n')
out.write('$I$,{},{},A,'.format(tok,tok_anal))
out.write('{}\n'.format((tok-tok_anal)/tok_anal*100))
out.write('$Z_0$,{},{},\\ohm,'.format(Z0,Z0_anal))
out.write('{}\n'.format((Z0-Z0_anal)/Z0_anal*100))
out.write('$C$,{},{},pF\\per\\metre,'.format(C*1e12,C_anal*1e12))
out.write('{}\n'.format((C-C_anal)/C_anal*100))
out.write('$L$,{},{},nH\\per\\metre,'.format(L*1e9,L_anal*1e9))
out.write('{}'.format((L-L_anal)/L_anal*100))
x = np.linspace(a, b, 100)
y = np.zeros(len(x))
primer_ana_e = E_anal(x)
primer_fem_e = np.array(list(map(project(E),zip(x,y))))[:,0]
plt.plot(x, primer_ana_e, label='Analitsko')
plt.plot(x, primer_fem_e, '--', label='FEniCS')
plt.xlabel('Polmer (m)')
plt.ylabel('Elektricno polje E (V/m)')
plt.grid()
plt.legend()
if shrani:
plt.savefig('slike/{}-anal-e.pdf'.format(problem),bbox_inches='tight')
plt.show()
plt.plot(x, (primer_ana_e-primer_fem_e)/primer_ana_e*100)
plt.xlabel('Polmer (m)')
plt.ylabel('Relativna napaka %')
plt.grid()
if shrani:
plt.savefig('slike/{}-napaka-e.pdf'.format(problem),bbox_inches='tight')
plt.show()
primer_ana_h = H_anal(x)
primer_fem_h = np.array(list(map(project(H),zip(x,y))))[:,1]
plt.plot(x, primer_ana_h, label='Analitsko')
plt.plot(x, primer_fem_h, '--', label='FEniCS')
plt.xlabel('Polmer (m)')
plt.ylabel('Magnetno polje H (V/m)')
plt.grid()
plt.legend()
if shrani:
plt.savefig('slike/{}-anal-h.pdf'.format(problem),bbox_inches='tight')
plt.show()
plt.plot(x, (primer_ana_h-primer_fem_h)/primer_ana_h*100)
plt.xlabel('Polmer (m)')
plt.ylabel('Relativna napaka %')
plt.grid()
if shrani:
plt.savefig('slike/{}-napaka-h.pdf'.format(problem),bbox_inches='tight')
plt.show()
if problem == 'stripline':
def We(W, b):
if W/b > 0.35:
return W
else:
We_b = W/b-(0.35-W/b)**2
return We_b*b
W = 0.8e-3
b = 1.6e-3
tmp = b/(We(W,b)+0.441*b)
Z0strip = 30*np.pi/np.sqrt(eps_r)*tmp
print(Z0strip)
print(Z0)
napaka = (Z0strip-Z0)/Z0*100
print(napaka)