[Getdp] Help on problem formulation - constraits

Ivan Vicente Janvrot Miranda janvrot at infolink.com.br
Mon Apr 29 03:45:08 CEST 2002


Dear All

I' using this excellent program in a 3D study a 1/4" thick steel plate
with a magnet at each side and  a hole in the middle. The problem
addresses the case of a very wide plate with wide magnets and a small
hole, which is the region of interest.

I defined the geometry with gmsh and generated the mesh for one quadrant
of the problem to exploit symetry. There is an air volume above and
below the plate. Attached is a .jpg with a schematic.

I'm using the suggestion found in the FAQ (for gmsh t5.geo) given
below,  but I'm not able to define the constraints to apply to Surfaces
A to D and Upper and Lower air bound surfaces.

I' would be gratefull for any help.
Thanks in advance.

Janvrot IVM
janvrot at infolink.com.br

--------------------------------------------------------------------------------------------------

/*
Magnetostatic problem (scalar magnetic potential), based on t5.pro from
FAQ
*/

Group {
  Steel   = Region[ 1 ];
  Magnet  = Region[ 2 ];
  Air     = Region[ 3 ];
  Domain  = Region[ {Magnet, Steel, Air} ];
  // SurfaceA = ...; // uniform until infinity
  // SurfaceB = ...; // out interest
  // SurfaceC = ...; // simetry plane
  // SurfaceD = ...; // simetry plane
  // UpperAirBoundSurface = ...;
  // LowerAirBoundSurface = ...;
}

Function {
  mu0 = 4.e-7 * Pi ;
  murSteel = 1000;
  murMagnet = 1;
  mu[Steel]   = murSteel * mu0;
  mu[Magnet]  = murMagnet * mu0;
  mu[Air]     = mu0;
  hc[Magnet]  = Vector[920000., 0., 0.];
}

Jacobian {
  { Name MyJac;
    Case {
      { Region All; Jacobian Vol; }
    }
  }
}

Integration {
  { Name MyInt;
    Case {
      { Type Gauss;
        Case {
   { GeoElement Tetrahedron; NumberOfPoints 5; }
 }
      }
    }
  }
}

FunctionSpace {
  { Name Hgrad_phi; Type Form0;
    BasisFunction {
      { Name sn; NameOfCoef phin; Function BF_Node;
        Support Domain; Entity NodesOf[ All ]; }
      // uncomment the following for 2nd order interpolation:
      //{ Name sn2; NameOfCoef phin2; Function BF_Node_2E;
      //  Support Domain; Entity EdgesOf[ All ]; }
    }
  }
}

Formulation {
  { Name MagSta_phi; Type FemEquation;
    Quantity {
      { Name phi; Type Local; NameOfSpace Hgrad_phi; }
    }
    Equation {
      Galerkin { [ - mu[] * Dof{d phi} , {d phi} ];
                 In Domain; Jacobian MyJac; Integration MyInt; }
      Galerkin { [ - mu[] * hc[] , {d phi} ];
                 In Magnet; Jacobian MyJac; Integration MyInt; }
    }
  }
}

Resolution {
  { Name MagSta_phi;
    System {
      { Name A; NameOfFormulation MagSta_phi; }
    }
    Operation {
      Generate[A]; Solve[A]; SaveSolution[A];
    }
  }
}

PostProcessing {
  { Name MagSta_phi; NameOfFormulation MagSta_phi;
    Quantity {
      { Name phi; Value { Local { [ {phi} ]; In Domain; Jacobian MyJac;}
} }
      { Name b;   Value
           {
               Local { [ - mu[] * {d phi} ]; In Domain; Jacobian MyJac;
}
               Local { [ - mu[] * hc[] ]   ; In Magnet; Jacobian MyJac;
}
           }
      }
    }
  }
}

PostOperation {
  { Name phi; NameOfPostProcessing MagSta_phi;
    Operation {
      Print[ phi, OnElementsOf Domain, File "phi.pos"];
      Print[ b, OnElementsOf Domain, File "b.pos"];
      Print[ b, OnCut {{0,0,0.004}{1,0,0.004}{1,1,0.004}}, File "bc.pos"
];
      // Print[ b,  OnCut {{0,0,-0.002}{1,0,-0.002}{1,1,-0.002}}, File
"bc.pos" ];
    }
  }
}



-------------- next part --------------
A non-text attachment was scrubbed...
Name: esquema.jpg
Type: image/jpeg
Size: 10250 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/getdp/attachments/20020428/50b4c663/attachment.jpg>