[Fwd: [Getdp] Help on problem formulation - constraits]
janvrot at infolink.com.br
janvrot at infolink.com.br
Sat May 4 04:37:09 CEST 2002
Dear Patrick,
I dropped the magnet, put a Constant phi for Surface B and another
constant phi for oposing surface A and it's fairly representing my
problem, tanks to the embedded Newmann default constrait that copes with
the symetry for the problem.
Now I'm experimenting with mesh size.
I wonder if you have any clue si I could evaluate/control final result
precision.
Thank you for the explanation (and for getdp :-)
Janvrot
Patrick Dular wrote:
>
> Dear Ivan,
>
> For Dirichlet constraints on your scalar potential, you have to add a Constraint field before the FunctionSpace field, as well as a call to this Constraint field in this FunctionSpace field. The homogeneous Neumann constraint is implicit in the formulation (no surface term).
>
> This would give:
>
> Constraint {
> { Name MagneticScalarPotential ;
> Case {
> { Region SurfaceA ; Value 0. ; } // write the value you want to fix...
> { Region SurfaceC ; Value 1. ; }
> // ... and the other surfaces
> }
> }
> }
>
> (to be written just after the Function field for clarity)
>
> ... and ...
>
> 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 ]; }
> }
> Constraint {
> { NameOfCoef phin ;
> EntityType NodesOf ; NameOfConstraint MagneticScalarPotential ; }
> }
> }
> }
>
> Is this what you need for your constraints?
>
> Patrick
>
> -------- Original Message --------
> Subject: [Getdp] Help on problem formulation - constraits
> Date: Sun, 28 Apr 2002 22:45:08 -0300
> From: Ivan Vicente Janvrot Miranda <janvrot at infolink.com.br>
> To: getdp at geuz.org
>
> > 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" ];
> > }
> > }
> > }
> >
> > -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> > [Image]
>
> --
> Patrick Dular, Dr. Ir., Chercheur qualifii F.N.R.S. (Research associate)
> Dipartement d'Electriciti, Electronique et Informatique
> Uniti d'Electriciti Appliquie
> Universiti de Lihge - Institut Montefiore - Bbt. B28 - Parking 32
> B-4000 Lihge - Belgique - Tel. +32-4 3663710 - Fax +32-4 3662910
> E-mail: Patrick.Dular at ulg.ac.be
>
> _______________________________________________
> GetDP mailing list
> GetDP at geuz.org
> http://www.geuz.org/mailman/listinfo/getdp
--
Janvrot IVM
janvrot at infolink.com.br