channel.geo 509 B

123456789101112131415161718192021222324
  1. boxlen = 2.0;
  2. boxwidth = 0.8;
  3. cylinderradius = 0.07;
  4. cylinderxpos = 0.25;
  5. // Tiny misalignment:
  6. cylinderypos = boxwidth/2 + boxwidth/1000;
  7. Mesh.CharacteristicLengthFactor = 0.05;
  8. SetFactory("OpenCASCADE");
  9. Rectangle(1) = {0, 0, 0, boxlen, boxwidth, 0};
  10. Disk(2) = {cylinderxpos, cylinderypos, 0, cylinderradius, cylinderradius};
  11. Coherence;
  12. fluid = 1; cylinder = 2; inlet = 3; outlet = 4;
  13. Physical Surface(fluid) = 3;
  14. Physical Surface(cylinder) = 2;
  15. Physical Line(inlet) = 2;
  16. Physical Line(outlet) = 3;