I try to model a source to drain channel and use NEGF solver to get some figure. I can run the solver because I can see the iteration message, but error on plotting procedure.
When I run the tutorial, this example code can run completely. So, I think maybe the point is on mesh file. But I don`t know where goes wrong.
This is my .geo file
`SetFactory("OpenCASCADE");
//dimensions
//x
total_w = 100;
gate_w = 60;
gap = 30;
//y
total_l = 700;
source_l = (total_l-gate_w)/2;
drain_l = source_l;
//z
total_h = 180;
insu_h = 65;
dot_h = 30;
subs_h = insu_h-dot_h;
//characteristic length
h = 20;
//channel_point
Point(1) = {-total_w/2, 0, 0, h};
Point(2) = {total_w/2, 0, 0, h};
Point(3) = {total_w/2, 0, dot_h, h};
Point(4) = {-total_w/2, 0, dot_h, h};
Line(1) = {1, 2}; Line(2) = {2, 3}; Line(3) = {3, 4}; Line(4) = {4, 1};
Curve Loop(1) = {1, 2, 3, 4};
Plane Surface(1) = {1};
//ox_point
Point(5) = {-total_w/2, 0, dot_h, h};
Point(6) = {total_w/2, 0, dot_h, h};
Point(7) = {total_w/2, 0, dot_h+insu_h, h};
Point(8) = {-total_w/2, 0, dot_h+insu_h, h};
Line(5) = {5, 6}; Line(6) = {6, 7}; Line(7) = {7, 8}; Line(8) = {8, 5};
Curve Loop(2) = {5, 6, 7, 8};
Plane Surface(2) = {2};
//sub_point
Point(9) = {-total_w/2, 0, 0, h};
Point(10) = {total_w/2, 0, 0, h};
Point(11) = {total_w/2, 0, -subs_h, h};
Point(12) = {-total_w/2, 0, -subs_h, h};
Line(9) = {9, 10}; Line(10) = {10, 11}; Line(11) = {11, 12}; Line(12) = {12, 9};
Curve Loop(3) = {9, 10, 11, 12};
Plane Surface(3) = {3};
//volume
nlayers = source_l/h;
sour[] = Extrude (0, source_l, 0) { Surface{1}; Layers{nlayers}; };
sour_ox[] = Extrude (0, source_l, 0) { Surface{2}; Layers{nlayers}; };
sour_sub[] = Extrude (0, source_l, 0) { Surface{3}; Layers{nlayers}; };
nlayers = gate_w/h;
qpc[] = Extrude (0, gate_w, 0) { Surface{sour[0]}; Layers{nlayers}; };
qpc_ox[] = Extrude (0, gate_w, 0) { Surface{sour_ox[0]}; Layers{nlayers}; };
qpc_sub[] = Extrude (0, gate_w, 0) { Surface{sour_sub[0]}; Layers{nlayers}; };
nlayers = drain_l/h;
drai[] = Extrude (0, drain_l, 0) { Surface{qpc[0]}; Layers{nlayers}; };
drai_ox[] = Extrude (0, drain_l, 0) { Surface{qpc_ox[0]}; Layers{nlayers}; };
drai_sub[] = Extrude (0, drain_l, 0) { Surface{qpc_sub[0]}; Layers{nlayers}; };
//Physics group
Physical Surface("QPC_gate") = {qpc_ox[4]};
Physical Surface("source_bnd") = {1};
Physical Surface("drain_bnd") = {drai[0]};
Physical Surface("bottom") = {sour_sub[4], qpc_sub[4], drai_sub[4]};
Physical Volume("ox_layer") = {sour_ox[1], qpc_ox[1], drai_ox[1]};
Physical Volume("substrate") = {sour_sub[1], qpc_sub[1], drai_sub[1]};
Physical Volume("QPC") = {qpc[1]};
Physical Volume("source") = {sour[1]};
Physical Volume("drain") = {drai[1]};
Mesh 1;
Mesh 2;
Mesh 3;
Save "test_QPC.msh2";
Save "test_adaptive.geo_unrolled";
`