[Getdp] Nonlinear BH

janvrot at infolink.com.br janvrot at infolink.com.br
Sat May 4 22:56:48 CEST 2002


Hi all

After Patrick kindly help me, I have a functioning Magnetostatic scalar
potential calculation. Displayed fields are as expected, but with field
levels in the problem I must introduce a nonlinear BH curve.

I'm trying a mu[Steel] = InterpolationLinear[$1]{...} function as below,
but I get the message bellow and I can't figure out its meaning (real
beginner :-)

P r o c e s s i n g . . .
Operation : Generate[A]
Solver    : Loading parameter file 'solver.par'
Resources : cpu 9.350000 s / mem 0 kb
Operation : Solve[A]
Solver    : No scaling of system of equations
Solver    : RCMK algebraic renumbering
Solver    : N: 30195, NZ: 355081, BW max/avg: 24/11, SW max: 30112
Resources : cpu 9.770000 s / mem 0 kb
Solver    : ILUTP (Float, fill-in = 20)
Error     : Zero row encountered in ILU

BTW, I'm using the solver.par from the getdp demo.

A new Galerkin was introduced, is it ok? And for Resolution, is it ok?

Thanks in advance for any help.
Janvrot

The .pro file follows:

/*
Magnetostatic problem (scalar magnetic potential), based on t5.pro from
FAQ
*/
mm = 1e-3 ;

Include "def-par.inc";  // defect parameters
Include "env-par.inc";  // environment size parameters

Group {
  Steel   = Region[ 1 ];
  Air     = Region[ 3 ];
  Domain  = Region[ {Steel, Air} ];
  SurfaceA = Region[ 10 ]; //
  SurfaceC = Region[ 12 ]; // simetry plane
}

Function {
  mu0 = 4.e-7 * Pi ;
  murSteel = 1000;
  // mu[Steel]   = murSteel * mu0;
// First column is h(Oe), second is b(Gauss), maybe some scale factor is
needed
mu[Steel] = InterpolationLinear[$1]{
0.0000000e+000,  0.0000000e+000,
2.6389378e+000,  1.1785000e+003,
5.2778757e+000,  6.1701000e+003,
1.5833627e+001,  1.3628200e+004,
2.6389378e+001,  1.5237100e+004,
3.6945130e+001,  1.5977000e+004,
4.7500881e+001,  1.6442400e+004,
5.6799995e+001,  1.6757300e+004,
6.7858401e+001,  1.7065500e+004,
7.6152206e+001,  1.7268000e+004,
8.7210612e+001,  1.7501600e+004,
9.5504417e+001,  1.7653200e+004,
9.8269018e+001,  1.7678100e+004,
2.5118105e+002,  1.9147300e+004,
4.2216395e+002,  1.9889300e+004,
6.0797162e+002,  2.0252200e+004,
8.0031523e+002,  2.0448000e+004,
9.9663627e+002,  2.0542100e+004,
1.1937805e+003,  2.0615000e+004,
1.2926748e+003,  2.0643300e+004,
1.3917012e+003,  2.0668200e+004,
1.4909347e+003,  2.0687900e+004,
1.6894244e+003,  2.0726500e+004,
1.8887185e+003,  2.0744500e+004,
2.0875119e+003,  2.0775400e+004,
2.2869106e+003,  2.0790700e+004,
2.4863847e+003,  2.0804100e+004,
2.6861077e+003,  2.0811300e+004,
2.8855818e+003,  2.0824700e+004,
3.0852284e+003,  2.0833800e+004,
3.2851930e+003,  2.0834600e+004,
3.4850332e+003,  2.0838800e+004,
3.6847654e+003,  2.0845500e+004,
3.8846298e+003,  2.0849100e+004,
4.2846034e+003,  2.0849200e+004,
6.2860950e+003,  2.0849302e+004
};

  mu[Air]     = mu0;
}

Constraint {

  { Name phi ;
    Case {
      { Region SurfaceA ; Value 0. ; }
      { Region SurfaceC ; Value 10. ; }
    }
  }

}
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 ]; }
    }
    Constraint {
      { NameOfCoef phin ; EntityType NodesOf ; NameOfConstraint phi ; }
    }
  }
}

Formulation {
  { Name MagSta_phi; Type FemEquation;
    Quantity {
      { Name phi; Type Local; NameOfSpace Hgrad_phi; }
    }
    Equation {
      Galerkin { [ - mu[] * Dof{d phi} , {d phi} ];
                 In Air; Jacobian MyJac; Integration MyInt; }
      Galerkin { [ - mu[Norm[{d phi}]] * Dof{d phi} , {d phi} ];
                 In Steel; 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 h;   Value { Local { [ {d phi} ]; In Domain; Jacobian
MyJac;} } }
      { Name b;   Value
           {
               Local { [ - mu[] * {d phi} ]; In Domain; Jacobian MyJac;
}
           }
      }
    }
  }
}

PostOperation {
  { Name phi; NameOfPostProcessing MagSta_phi;
    Operation {
      // Valores basicos
      Print[ phi, OnElementsOf Domain, File "phi.pos"] ;
      Print[ b,   OnElementsOf Domain, File "b_phi.pos", Depth 0 ] ;
      Print[ h,   OnElementsOf Domain, File "h_phi.pos", Depth 0 ] ;
      // etc ...
    }
  }
}




-- 
Janvrot IVM
janvrot at infolink.com.br