Lemma is an Electromagnetics API
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. namespace Lemma{
  2. /**
  3. \page EmSources
  4. <div class="lemmamainmenu">
  5. \ref Intro "Intro"
  6. | \ref Compiling "Compiling"
  7. | \ref Memory "Memory management "
  8. | \ref Minimal "Minimal programme"
  9. | \b EM \b Sources
  10. </div>
  11. We support the following dipole types:
  12. - Grounded electric
  13. - ungrounded electric
  14. - magnetic
  15. Each in horizontal and vertical polarizations. Dipoles may be placed anywhere in a model.
  16. \code
  17. DipoleSource *dipole = DipoleSource::New();
  18. dipole->SetType(GROUNDEDELECTRICDIPOLE);
  19. dipole->SetPolarisation(XPOLARISATION);
  20. //dipole->SetPolarisation(YPOLARISATION);
  21. //dipole->SetPolarisation(ZPOLARISATION);
  22. //dipole->SetType(UNGROUNDEDELECTRICDIPOLE);
  23. //dipole->SetPolarisation(XPOLARISATION);
  24. //dipole->SetPolarisation(YPOLARISATION);
  25. //dipole->SetPolarisation(ZPOLARISATION);
  26. //dipole->SetType(MAGNETICDIPOLE);
  27. //dipole->SetPolarisation(XPOLARISATION);
  28. //dipole->SetPolarisation(YPOLARISATION);
  29. //dipole->SetPolarisation(ZPOLARISATION);
  30. dipole->SetMoment(1);
  31. dipole->SetLocation(1,1,-1e-4);
  32. dipole->SetNumberOfFrequencies(1);
  33. dipole->SetFrequency(0,2000);
  34. dipole->SetPhase(0);
  35. \endcode
  36. Each of the above dipole types is shown in this example. Note the use of enumerations (ALLCAPS) instead of integer markers,
  37. making the code immediately obvious. The location is set in x,y,z order. A right hand coordinate system is used with
  38. a pointing down. So this dipole is just in the air.
  39. Only a sinlge frequency is computed, at 2000 Hz, and the phase is set to zero.
  40. \section Other Other sources
  41. Currently we also support arbitrary ungrounded wire loops. We plan to support grounded wire loops in the near future as well.
  42. For our example we will construct a wire antenna loop. To do this insert this code into your skeleton application shown on the previous page.
  43. \code
  44. PolygonalWireAntenna *pa = PolygonalWireAntenna::New();
  45. pa->SetNumberOfPoints(5);
  46. pa->SetPoint(0, Vector3r( 0, 0, -1e-3));
  47. pa->SetPoint(1, Vector3r( 100, 0, -1e-3));
  48. pa->SetPoint(2, Vector3r( 100, 100, -1e-3));
  49. pa->SetPoint(3, Vector3r( 0, 100, -1e-3));
  50. pa->SetPoint(4, Vector3r( 0, 0, -1e-3));
  51. pa->SetNumberOfFrequencies(2);
  52. pa->SetFrequency(0, 1000);
  53. pa->SetFrequency(0, 5000);
  54. pa->SetCurrent(10);
  55. pa->SetNumberOfTurns(1);
  56. \endcode
  57. The code is basically self-explanitory. We are constructing a single turn wire loop with 5 points. The first and last
  58. point are the same making this a loop, but that is not a requirement. All loops must be 'closed' in this fashion.
  59. We are interested in two frequencies: 1 and 5 kHz and we have a 10 A current running through a single turn wire.
  60. */
  61. }