magmesh.geo 1022 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Wire position and radius:
  2. r = 0.1;
  3. xpos = -0.5;
  4. // Shield position and radius:
  5. xposshield = 0.7;
  6. rshieldin = 0.35;
  7. rshieldout = 0.5;
  8. // Domain size around:
  9. rout = 1.5;
  10. // Height:
  11. h = 0.3;
  12. SetFactory("OpenCASCADE");
  13. Disk(1) = {xpos, 0, 0, r, r};
  14. Disk(2) = {xposshield, 0, 0, rshieldout, rshieldout};
  15. Disk(3) = {xposshield, 0, 0, rshieldin, rshieldin};
  16. Disk(4) = {0, 0, 0, rout, rout};
  17. Characteristic Length {4, 2, 1} = 0.04;
  18. Characteristic Length {3} = 0.04;
  19. Coherence;
  20. Recombine Surface(1);
  21. Recombine Surface(3);
  22. Recombine Surface(4);
  23. Recombine Surface(5);
  24. nz = 1;
  25. Extrude {0,0,h} { Surface{1}; Layers{nz}; Recombine;}
  26. Extrude {0,0,h} { Surface{3}; Layers{nz}; Recombine;}
  27. Extrude {0,0,h} { Surface{4}; Layers{nz}; Recombine;}
  28. Extrude {0,0,h} { Surface{5}; Layers{nz}; Recombine;}
  29. // Define the physical regions:
  30. conductor = 1; shield = 2; air = 3; contour = 4;
  31. Physical Volume(conductor) = {1};
  32. Physical Volume(air) = {2,4};
  33. Physical Volume(shield) = {3};
  34. Physical Surface(contour) = {13, 1,3,4,5, 7,9,12,16};