Skip to content
Snippets Groups Projects
Select Git revision
  • f55633bad0503ecf844c3a10072aaf1d9e92e2f8
  • master default protected
  • patches-4.14
  • steplayer
  • bl
  • pluginMeshQuality
  • fixBugsAmaury
  • hierarchical-basis
  • alphashapes
  • relaying
  • new_export_boris
  • oras_vs_osm
  • reassign_partitions
  • distributed_fwi
  • rename-classes
  • fix/fortran-api-example-t4
  • robust_partitions
  • reducing_files
  • fix_overlaps
  • 3115-issue-fix
  • 3023-Fillet2D-Update
  • gmsh_4_14_0
  • gmsh_4_13_1
  • gmsh_4_13_0
  • gmsh_4_12_2
  • gmsh_4_12_1
  • gmsh_4_12_0
  • gmsh_4_11_1
  • gmsh_4_11_0
  • gmsh_4_10_5
  • gmsh_4_10_4
  • gmsh_4_10_3
  • gmsh_4_10_2
  • gmsh_4_10_1
  • gmsh_4_10_0
  • gmsh_4_9_5
  • gmsh_4_9_4
  • gmsh_4_9_3
  • gmsh_4_9_2
  • gmsh_4_9_1
  • gmsh_4_9_0
41 results

OCCFace.cpp

Blame
  • magnetometer.pro 7.52 KiB
    Include "magnetometer_data.geo";
    
    DefineConstant[
      Flag_AnalysisType = {3, Name "Input/0Type of analysis",
        Choices{0="Eigenmodes",
          1="Electrokinetics",
          2="Electro-mechanical (static)",
          3="Electro-mechanical (dynamic)",
          4="Electro-thermal"}}
      DEGRE2 = {0, Choices{0="First order", 1="Second order"},
        Name "Input/1FE scheme"}
    ];
    
    Group {
      // electrical
      DomainC_Ele = Region[ {BEAM, CONDUCTOR_LEFT, CONDUCTOR_RIGHT} ] ;
      Dirichlet0 = Region[{VOLTAGE_LEFT}];
      Dirichlet1 = Region[{VOLTAGE_RIGHT}];
    
      // mechanical
      Domain_Disp = Region[{DomainC_Ele}];
      Domain_Force = Region[{Domain_Disp}];
    
      // thermal
      Domain_The = Region[{DomainC_Ele}];
      SurfaceConv_The = Region[{}];
    }
    
    Function {
      // desired fundamental frequency (onelab parameter)
      DefineConstant[
        f0d = {1e5, Name StrCat(pInOpt,"Desired fundamental frequency [Hz]")}
      ];
    
      // fundamental frequency
      f0[] = $EigenvalueReal/(2*Pi);
    
      // objective function
      objective[] = SquNorm[ f0[] - f0d];
    }
    
    Function {
      // electrical
      DefineConstant[
        sigm = {37e6, Name "Input/Materials/3Electric conductivity",
          Label "Electric conductivity [S/m]",
          Visible (Flag_AnalysisType != 0)},
        b_y = {-1e-6, Name "Input/91B field (y comp.) [T]",
          Visible (Flag_AnalysisType != 0)},
        V_imposed = {0.00181, Name "Input/92Voltage [V]",
          Visible (Flag_AnalysisType != 0)}
      ];
      sigma[DomainC_Ele] = sigm ;
      bext[] = Vector[0, b_y, 0];
    
      // mechanical
      DefineConstant[
        young = {150e9, Name "Input/Materials/0Young modulus [Pa]",
          Visible (Flag_AnalysisType != 1)},
        poisson = {0.17, Name "Input/Materials/1Poisson coeficient",
          Visible (Flag_AnalysisType != 1)},
        rh = {4400, Name "Input/Materials/2Mass density", Label "Mass density [kg/m^3]",
          Visible (Flag_AnalysisType != 1)},
        Freq = {100e3, Name "Input/93Frequency [Hz]", Min 90e3, Max 120e3, Step 2.5e3,
          Visible (Flag_AnalysisType == 3)},
        target_freq = {0, Name "Input/93Target frequency [Hz]", Min 0, Max 1e7, Step 1e4,
          Visible (Flag_AnalysisType == 0)}
      ];
    
      //F[] = Vector[0, 0, 10];