[Getdp] @D axisymmetric electrostatic problem
Nacho Andres
nacho.andres at deos.tudelft.nl
Wed Apr 6 18:23:00 CEST 2005
Yes sure,
Have a look to the pro file that I attached.
Best Regards,
Nacho
On Wed, 2005-04-06 at 16:14, Patrick Dular wrote:
> Nacho,
>
> Could you send a example illustrating what you explain? Thank you.
>
> Patrick
-------------- next part --------------
/* ------------------------------------------------------------------------
File "EleStat.v_toy.pro"
Toy to play before Photoelectric Emission Effect on Lageos
This program expresses the formulation part of the problem
Created by N at cho Andres, Feb, 2004
------------------------------------------------------------------------
------------------------------------------------------------------------
Input:
* Global Groups
ConductingDomain Conducting regions
WholeDomain Including Surfaces+Lines+Points
* Function
sigma[] Conductivity of several components
CoLat[] CoLatitude w.r.t. Sun's direction
IllPhotoFunc[] B.C. for the illuminated part of the
outer surface
DarkPhotoFunc[] idem for the dark part
* Neumann Boundary Conditions
1. Photoelectric condition at the external boundary of the sphere
2. Axis of Symmetry normal derivative must be null
3. At the interface between two materials the weak formulation
implicitly solves for the continuity is problem
------------------------------------------------------------------------ */
Group {
DefineGroup [ ConductingDomain ];
DefineGroup [ WholeDomain ];
DefineGroup [ Surfaces ];
}
Function {
DefineFunction [ sigma ];
DefineFunction [ CoLat ];
DefineFunction [ IllPhotoFunc ];
DefineFunction [ DarkPhotoFunc ];
}
// Quoting Cristophe:
//
// << Contrary to a Dirichlet condition where you directly set the value of
// some degrees of freedom, here you define a new integration term on the
// boundary, where the unknowns have to be interpolated and integrated. You
// thus need to add the region on which you do that integration to the
// 'Support' of your 'FunctionSpace' >>
//
// In my case this implies that SurfIll, SurfDark and SymAx (Physical Surfaces
// appearing in the Neumann condition should appear in the 'Support' of my
// 'FunctionSpace')
FunctionSpace {
{ Name PhEl_v_Ele; Type Form0;
BasisFunction {
// v = v_n * s_n , for all nodes
{ Name sn; NameOfCoef vn; Function BF_Node;
Support Region[{ConductingDomain,SurfIll,SurfDark,SymAx}] ; Entity NodesOf[ All ];
}
// { Name s2; NameOfCoef v2n; Function BF_Edge;
// Support Region[{ConductingDomain,SurfIll,SurfDark,SymAx}] ; Entity EdgesOfTreeIn[Surfaces, StartingOn Surfaces]; }
// { Name s2; NameOfCoef v2n; Function BF_Node_2E;
// Support Region[{ConductingDomain,SurfIll,SurfDark,SymAx}] ; Entity NodesOf[ All ]; }
}
Constraint {
{ NameOfCoef vn; EntityType NodesOf; NameOfConstraint FloatingP; }
// { NameOfCoef v2n; EntityType NodesOf; NameOfConstraint FloatingP; }
}
}
}
Formulation {
{ Name PhEl_v; Type FemEquation;
Quantity {
{ Name v; Type Local; NameOfSpace PhEl_v_Ele; }
}
Equation {
Galerkin { [ sigma[] * Dof{d v} , {d v} ]; In ConductingDomain;
Jacobian JVolAxiSqu; Integration GradGrad; }
// For the Neumann B.C.
Galerkin { [ DarkPhotoFunc[] , {v} ]; In SurfDark;
Jacobian JSurAxi; Integration GradGrad; }
Galerkin { [ IllPhotoFunc[CoLat[X[],Y[]]] , {v} ];
In SurfIll; Jacobian JSurAxi; Integration GradGrad; }
}
}
}
Resolution {
{ Name PhEl_v_res;
System {
{ Name Sys_Ele; NameOfFormulation PhEl_v; }
}
Operation {
Generate[Sys_Ele]; Solve[Sys_Ele]; SaveSolution[Sys_Ele];
}
}
}
PostProcessing {
{ Name EleSta_v; NameOfFormulation PhEl_v;
Quantity {
{ Name BC1;
Value {
Local { [ IllPhotoFunc[CoLat[X[],Y[]]] ]; In SurfIll; Jacobian JSurAxi; }
}
}
{ Name BC2;
Value {
Local { [ DarkPhotoFunc[] ]; In SurfDark; Jacobian JSurAxi; }
}
}
{ Name BC3;
Value {
Local { [ {v} ]; In SymAx; Jacobian JLin; }
}
}
{ Name Int;
Value {
Local { [ Normal[] * {d v} ]; In Surfaces; Jacobian JSurAxi; }
}
}
{ Name v;
Value {
Local { [ {v} ]; In ConductingDomain; Jacobian JVolAxiSqu; }
Local { [ {v} ]; In SymAx; Jacobian JLin; }
Local { [ {v} ]; In SurfIll; Jacobian JSurAxi; }
Local { [ {v} ]; In SurfDark; Jacobian JSurAxi; }
}
}
{ Name e;
Value {
Local { [ -{d v} ]; In ConductingDomain; Jacobian JVolAxiSqu; }
}
}
{ Name j;
Value {
Local { [ -sigma[] * {d v} ]; In ConductingDomain; Jacobian JVolAxiSqu; }
}
}
{ Name Nj;
Value {
Local { [ Norm[ -sigma[] * {d v}] ]; In ConductingDomain; Jacobian JVolAxiSqu; }
}
}
}
}
}