Skip to content
Snippets Groups Projects
Commit 7db786f3 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

up

parent 30d765d1
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Tutorial 3 : linear elastic model of a wrench Tutorial 3 : linear elastic model of a wrench
Features: Features:
- "Grad u" GetDP specific formulation for linear elasticity - "grad u" GetDP specific formulation for linear elasticity
- first and second order elements - first and second order elements
- triangular and quadrangular elements - triangular and quadrangular elements
...@@ -16,15 +16,15 @@ ...@@ -16,15 +16,15 @@
GetDP has a peculiar way to deal with linear elasticity. Instead of a vector GetDP has a peculiar way to deal with linear elasticity. Instead of a vector
field "u = Vector[ ux, uy, uz ]", the displacement field is regarded as two field "u = Vector[ ux, uy, uz ]", the displacement field is regarded as two
(2D case) or 3 (3D case) scalar fields. Unlike conventional formulations (2D case) or 3 (3D case) scalar fields. Unlike conventional formulations
then, GetDP's formulation is written in terms of the gradient "Grad u" of the then, GetDP's formulation is written in terms of the gradient "grad u" of the
displacement field, which is a non-symmetric tensor, and the needed displacement field, which is a non-symmetric tensor, and the needed
symmetrization (to define the strain tensor and relate it to the stress symmetrization (to define the strain tensor and relate it to the stress
tensor) is done through the constitutive relationship (Hooke law). The tensor) is done through the constitutive relationship (Hooke law). The
reason for this unusual formulation is to be able to use also for elastic reason for this unusual formulation is to be able to use also for elastic
problems the powerful geometrical and homological kernel of GetDP, which problems the powerful geometrical and homological kernel of GetDP, which
relies on the operators Grad, Curl and Div. relies on the operators grad, curl and div.
The "Grad u" formulation entails a small increase of assembly work but makes The "grad u" formulation entails a small increase of assembly work but makes
in counterpart lots of geometrical features implemented in GetDP (change of in counterpart lots of geometrical features implemented in GetDP (change of
coordinates, function spaces, etc...) applicable to elastic problems coordinates, function spaces, etc...) applicable to elastic problems
out-of-the-box, since the scalar fields { ux, uy, uz } have exactly the same out-of-the-box, since the scalar fields { ux, uy, uz } have exactly the same
...@@ -142,7 +142,7 @@ Constraint { ...@@ -142,7 +142,7 @@ Constraint {
u . n = ux Cos [th] + uy Sin [th] = ... ; u . n = ux Cos [th] + uy Sin [th] = ... ;
are less naturally accounted for within the "Grad u" formulation; but they are less naturally accounted for within the "grad u" formulation; but they
could be easily implemented with a Lagrange multplier. could be easily implemented with a Lagrange multplier.
Finite element shape (triangles or quadrangles) makes no difference in the Finite element shape (triangles or quadrangles) makes no difference in the
......
...@@ -19,15 +19,15 @@ ...@@ -19,15 +19,15 @@
/* In this first tutorial we consider the calculation of the electric field /* In this first tutorial we consider the calculation of the electric field
given a static distribution of electric potential. This corresponds to an given a static distribution of electric potential. This corresponds to an
"electrostatic" physical model, obtained by combining the time-invariant "electrostatic" physical model, obtained by combining the time-invariant
Faraday equation (Curl e = 0, with e the electric field) with Gauss' Faraday equation (curl e = 0, with e the electric field) with Gauss'
law (Div d = rho, with d the displacement field and rho the charge density) law (div d = rho, with d the displacement field and rho the charge density)
and the dielectric constitutive law (d = epsilon e, with epsilon the and the dielectric constitutive law (d = epsilon e, with epsilon the
dielectric permittivity). dielectric permittivity).
Since Curl e = 0, e can be derived from a scalar electric potential v, such Since curl e = 0, e can be derived from a scalar electric potential v, such
that e = -Grad v. Plugging this potential in Gauss' law and using the that e = -grad v. Plugging this potential in Gauss' law and using the
constitutive law leads to a scalar Poisson equation in terms of the electric constitutive law leads to a scalar Poisson equation in terms of the electric
potential: -Div(epsilon Grad v) = rho. potential: -div(epsilon grad v) = rho.
We consider here the special case where rho = 0 to model a conducting We consider here the special case where rho = 0 to model a conducting
microstrip line on top of a dielectric substrate. A Dirichlet boundary microstrip line on top of a dielectric substrate. A Dirichlet boundary
...@@ -52,9 +52,9 @@ Group { ...@@ -52,9 +52,9 @@ Group {
/* We now define abstract regions to be used below in the definition of the /* We now define abstract regions to be used below in the definition of the
scalar electric potential formulation: scalar electric potential formulation:
Vol_Ele : volume where -Div(epsilon Grad v) = 0 is solved Vol_Ele : volume where -div(epsilon grad v) = 0 is solved
Sur_Neu_Ele: surface where non homogeneous Neumann boundary conditions Sur_Neu_Ele: surface where non homogeneous Neumann boundary conditions
(on n.d = -n . (epsilon Grad v)) are imposed (on n.d = -n . (epsilon grad v)) are imposed
Vol_xxx groups contain only volume elements of the mesh (triangles here). Vol_xxx groups contain only volume elements of the mesh (triangles here).
Sur_xxx groups contain only surface elements of the mesh (lines here). Sur_xxx groups contain only surface elements of the mesh (lines here).
...@@ -172,24 +172,24 @@ Formulation { ...@@ -172,24 +172,24 @@ Formulation {
deal with it carefully. deal with it carefully.
A GetDP Formulation encodes a so-called weak formulation of the original A GetDP Formulation encodes a so-called weak formulation of the original
partial differential equation, i.e. of -Div(epsilon Grad v) = 0. This weak partial differential equation, i.e. of -div(epsilon grad v) = 0. This weak
formulation involves finding v such that formulation involves finding v such that
(-Div(epsilon Grad v) , v')_Vol_Ele = 0 (-div(epsilon grad v) , v')_Vol_Ele = 0
holds for all so-called "test-functions" v', where (.,.)_D denotes an inner holds for all so-called "test-functions" v', where (.,.)_D denotes an inner
product over a domain D. If the test-functions v' are differentiable, product over a domain D. If the test-functions v' are differentiable,
integration by parts using Green's identity leads to finding v such that integration by parts using Green's identity leads to finding v such that
(epsilon Grad v, Grad v')_Vol_Ele + (n . (epsilon Grad v), v')_Bnd_Vol_Ele = 0 (epsilon grad v, grad v')_Vol_Ele + (n . (epsilon grad v), v')_Bnd_Vol_Ele = 0
holds for all v', where Bnd_Vol_Ele is the boundary of Vol_Ele. In our holds for all v', where Bnd_Vol_Ele is the boundary of Vol_Ele. In our
microstrip example this surface term vanishes, as there is either no test microstrip example this surface term vanishes, as there is either no test
function v' (on the Dirichlet boundary), or "n. (epsilon Grad v)" is zero function v' (on the Dirichlet boundary), or "n. (epsilon grad v)" is zero
(on the homogeneous Neumann boundary). We are thus eventually looking for (on the homogeneous Neumann boundary). We are thus eventually looking for
functions v in the function space Hgrad_v_Ele such that functions v in the function space Hgrad_v_Ele such that
(epsilon Grad v, Grad v')_Vol_Ele = 0 (epsilon grad v, grad v')_Vol_Ele = 0
holds for all v'. Finally, our choice here is to use a Gakerkin method, holds for all v'. Finally, our choice here is to use a Gakerkin method,
where the test functions v' are the same basis functions ("sn_k") as the where the test functions v' are the same basis functions ("sn_k") as the
......
...@@ -56,9 +56,9 @@ Group { ...@@ -56,9 +56,9 @@ Group {
/* Abstract regions: /* Abstract regions:
Vol_Ele : volume where -Div(epsilon Grad v) = 0 is solved Vol_Ele : volume where -div(epsilon grad v) = 0 is solved
Sur_Neu_Ele : surface where non homogeneous Neumann boundary conditions Sur_Neu_Ele : surface where non homogeneous Neumann boundary conditions
(on n.d = -n . (epsilon Grad v)) are imposed (on n.d = -n . (epsilon grad v)) are imposed
Sur_Electrodes_Ele : electrode regions */ Sur_Electrodes_Ele : electrode regions */
Vol_Ele = Region[ {Air, Diel1} ]; Vol_Ele = Region[ {Air, Diel1} ];
...@@ -140,15 +140,15 @@ FunctionSpace { ...@@ -140,15 +140,15 @@ FunctionSpace {
carried by that electrode. Indeed, let us consider the electrostatic weak carried by that electrode. Indeed, let us consider the electrostatic weak
formulation derived in Tutorial 1: find v in Hgradv_Ele such that formulation derived in Tutorial 1: find v in Hgradv_Ele such that
(epsilon Grad v, Grad v')_Vol_Ele + (n . (epsilon Grad v), v')_Bnd_Vol_Ele = 0 (epsilon grad v, grad v')_Vol_Ele + (n . (epsilon grad v), v')_Bnd_Vol_Ele = 0
holds for all test functions v'. When the test-function v' is BF_electrode, holds for all test functions v'. When the test-function v' is BF_electrode,
the boundary term reduces to the boundary term reduces to
(n . (epsilon Grad v), BF_electrode)_Sur_Electrodes_Ele. (n . (epsilon grad v), BF_electrode)_Sur_Electrodes_Ele.
Since BF_electrode == 1 on the electrode, the boundary term is actually Since BF_electrode == 1 on the electrode, the boundary term is actually
simply equal to the integral of (n . epsilon Grad v) on the electrode, simply equal to the integral of (n . epsilon grad v) on the electrode,
i.e. the flux of the displacement field, which is by definition the i.e. the flux of the displacement field, which is by definition the
charge Q_electrode carried by the electrodes. charge Q_electrode carried by the electrodes.
...@@ -215,7 +215,7 @@ Formulation { ...@@ -215,7 +215,7 @@ Formulation {
satisfies (just consider the equation corresponding to the test function satisfies (just consider the equation corresponding to the test function
BF_electrode): BF_electrode):
Q_electrode = (-epsilon Grad v, Grad BF_electrode)_Vol_Ele */ Q_electrode = (-epsilon grad v, grad BF_electrode)_Vol_Ele */
{ Name Electrostatics_v; Type FemEquation; { Name Electrostatics_v; Type FemEquation;
Quantity { Quantity {
{ Name v; Type Local; NameOfSpace Hgrad_v_Ele; } { Name v; Type Local; NameOfSpace Hgrad_v_Ele; }
......
...@@ -15,149 +15,126 @@ ...@@ -15,149 +15,126 @@
Run (button at the bottom of the left panel) Run (button at the bottom of the left panel)
------------------------------------------------------------------- */ ------------------------------------------------------------------- */
/* This model is a rectangular brick with two windows, /* This model is a rectangular brick with two windows, where various kinds of
where various kinds of thermal constraints can be set. thermal constraints can be set. Dirichlet, Neumann and convection boundary
Dirichlet, Neumann and convection boundary conditions are imposed conditions are imposed on different parts of the surface of the brick. The
on different parts of the surface of the brick. model is rather academic but it demonstrates some useful high-level GetDP
The model is rather academic but it features.
demonstrates some useful high-level GetDP features.
Governing eqations are Governing eqations are
div ( -lambda[] grad T ) = Q in Vol_Lambda_The div ( -lambda grad T ) = Q in Vol_The
-lambda[] grad T . n = qn = 0 on Sur_Neumann_The -lambda grad T . n = qn = 0 on Sur_Neu_The
Contact thermal resistance: Contact thermal resistance:
First, it is shown how to implement contact thermal resistances
with surface elements. The surface elements are associated with a
thickness and a thermal conductivity (typically much lower than that
of surrounding regions). The implementation takes advantage
of the powerful FunctionSpace definition in GetDP.
With the flag "Flag_Regularization", the contact surface First, it is shown how to implement contact thermal resistances with surface
can be, for the sake of comparison, replaced elements. The surface elements are associated with a thickness and a thermal
by a thin volume conducting region. conductivity (typically much lower than that of surrounding regions). The
implementation takes advantage of the powerful FunctionSpace definition in
GetDP.
With the flag "Flag_Regularization", the contact surface can be, for the sake
of comparison, replaced by a thin volume conducting region.
Thermal "electrode": Thermal "electrode":
The floating potential idea (introduced in tutorial 4)
is reconsidered here in a thermal context to represent a region The floating potential idea (introduced in tutorial 4) is reconsidered here
with a very large thermal conductivity where, consequently, in a thermal context to represent a region with a very large thermal
the temperature field is uniform (exactly like the electric potential conductivity where, consequently, the temperature field is uniform (exactly
is uniform on an electrode). like the electric potential is uniform on an electrode). The dual quantity
The dual quantity of this uniform temperature "T_electrode" [K] of this uniform temperature "T_electrode" [K] (which is the "associated
(which is the "associated global quantity" in GetDP language) global quantity" in GetDP language) is the heat flux "Q_electrode" [W]
is the heat flux "Q_electrode" [W] injected in the electrode injected in the electrode by the agent that maintains the temperature equal
by the agent that maintains the temperature equal
to the prescribed value. to the prescribed value.
The value of Q_electrode is a by-product of the system resolution The value of Q_electrode is a by-product of the system resolution provided
provided the term the term
GlobalTerm { [-Dof{Q_electrode} , {T_electrode} ] ; In Tfloating_The ; } GlobalTerm { [-Dof{Q_electrode} , {T_electrode} ] ; In Tfloating_The ; }
is present in the "Resolution" section. This term triggers the writing is present in the "Resolution" section. This term triggers the writing in the
in the linear system of a supplementary equation associated linear system of a supplementary equation associated with the global basis
with the global basis function BF{T_electrode}. function BF{T_electrode}. All integrations are automatically done by GetDP,
All integrations are automatically done by getDP, and the value of Q_electrode is obtained in postprocessing with the
and the value of Q_electrode is obtained in postprocessing PostOperation
with the PostOperation
Print[ Q_electrode, OnRegion Tfloating_The, ... ] Print[ Q_electrode, OnRegion Tfloating_The, ... ]
Heat flux through surfaces: Heat flux through surfaces:
The purpose of a thermal simulation usually goes beyond
the mere calculation of a temperature distribution. The purpose of a thermal simulation usually goes beyond the mere calculation
One is in general also interested in evaluating of a temperature distribution. One is in general also interested in
the heat flux q(S) through some specific surface S: evaluating the heat flux q(S) through some specific surface S:
q(S) = ( -lambda[] grad T . n )_S q(S) = ( -lambda grad T . n )_S
This quantity cannot be computed from the temperature This quantity cannot be computed from the temperature distribution available
distribution available on the surface S only. on the surface S only. As heat flux is related with the gradient of
As heat flux is related with the gradient of temperature temperature in the direction normal to the surface, its computation relies on
in the direction normal to the surface, its computation relies on the temperature distribution in a neighborhood of the surface. This means
the temperature distribution in a neighborhood of the surface. that volume elements in contact with the considered surface need be involved
This means that volume elements in contact with the considered surface in the computation. To achieve this with getDP, a good method proceeds by
need be involved in the computation. the definition a smooth auxiliary function g(S), with g(S)=1 on S, and g(S)=0
To achieve this with getDP, a good method proceeds outside a finite neighborhood of S. Typically, g(S) is the sum of the shape
by the definition a smooth auxiliary function g(S), functions of the nodes on S. Let w(S) be the support of g(S), and let dw(S)
with g(S)=1 on S, and g(S)=0 outside a finite neighborhood of S. denote the boundary of w(S). We then have, just adding and substracting
Typically, g(S) is the sum of the shape functions of the nodes on S. dw(S) to the surface of integration S
Let w(S) be the support of g(S),
and let dw(S) denote the boundary of w(S). q(S) = ( -lambda grad T . n g(S) )_{ dw(S) - ( dw(S)-S ) }.
We then have, just adding and substracting dw(S)
to the surface of integration S dw(S) being a boundary, Stokes theorem can be invoked and, after an
integration by part one ends up with
q(S) = ( -lambda[] grad T . n g(S) )_{ dw(S) - ( dw(S)-S ) }.
q(S) = ( -lambda grad T . grad g(S) )_w(S)
dw(S) being a boundary, Stokes theorem can be invoked and, - ( -lambda grad T . n g(S) )_{dw(S)-S}.
after an integration by part one ends up with
q(S) = ( -lambda[] grad T . grad g(S) )_w(S)
- ( -lambda[] grad T . n g(S) )_{dw(S)-S}.
+ ( Q g(S) )_w(S) + ( Q g(S) )_w(S)
Now, g(S) is zero on {dw(S)-S}, except maybe at some surface elements Now, g(S) is zero on {dw(S)-S}, except maybe at some surface elements
adjacents to dS, but not in dS. adjacents to dS, but not in dS. The second terme vanishes then if either S
The second terme vanishes then if either S is closed, is closed, or adjacent to a homogeneous Neumann boundary condition.
or adjacent to a homogeneous Neumann boundary condition.
The third term also vanishes, except if a region
with a nonzero heatsource Q is in contact with the surface S.
So we have nearly always the following practical formula The third term also vanishes, except if a region with a nonzero heatsource Q
to evaluate the heat flux across a surface S, is in contact with the surface S.
in terms of a well-chosen auxiliary scalar function g(S).
q(S) = ( -lambda[] grad T . grad g(S) )_{support of g(S)} So we have nearly always the following practical formula to evaluate the heat
flux across a surface S, in terms of a well-chosen auxiliary scalar function
g(S).
q(S) = ( -lambda grad T . grad g(S) )_{support of g(S)}
Particular cases: Particular cases:
For the heat flux through the boundary of a thermal electrode, For the heat flux through the boundary of a thermal electrode, one uses g(S)
one uses g(S) = BF(T_electrode). = BF(T_electrode). Note that this heat flux is equal to Q_electrode in the
Note that this heat flux is equal to Q_electrode stationary case. This is the case for the heat flux through the boundary of
in the stationary case. Window2
This is the case for the heat flux through the boundary of Window2
Auxiliary functions g(S) are also generated for the surfaces named
Auxiliary functions g(S) are also generated "Surface_i", i=1,2,3 in the model. Note that the flux computed through
for the surfaces named "Surface_i", i=1,2,3 in the model. Surface_3 is incorrect because this surface is not adjacent to surfaces with
Note that the flux computed through Surface_3 is incorrect homogeneous Neumann boundary conditions. */
because this surface is not adjacent to surfaces
with homogeneous Neumann boundary conditions.
*/
Include "brick_common.pro"; Include "brick_common.pro";
QWindow1 = QWindow1 = DefineNumber[1e3, Name "Window1/Heat source [W]"];
DefineNumber[1e3, Name "Window1/Heat source [W]"];
/* The user is given the choice of setting either the global temperature /* The user is given the choice of setting either the global temperature or the
or the global heat flux in Window2. global heat flux in Window2. Check how the variable "Flag_ConstraintWin2" is
Check how the variable "Flag_ConstraintWin2" is used at different used at different places to alter the model according to that choice and to
places to alter the model according to that choice manage the visibility of related input and output data.*/
and to manage the visibility of related input and output data.*/ QWindow2 = DefineNumber[1e3, Name "Window2/Heat source [W]",
QWindow2 =
DefineNumber[1e3, Name "Window2/Heat source [W]",
Visible Flag_ConstraintWin2]; Visible Flag_ConstraintWin2];
TWindow2 = TWindow2 = DefineNumber[50, Name "Window2/Temperature [degC]",
DefineNumber[50, Name "Window2/Temperature [degC]",
Visible !Flag_ConstraintWin2]; Visible !Flag_ConstraintWin2];
outQWindow2 = outQWindow2 = DefineNumber[0, Name "Output/Q window 2 [degC]",
DefineNumber[0, Name "Output/Q window 2 [degC]",
Visible !Flag_ConstraintWin2, Highlight "Ivory"]; Visible !Flag_ConstraintWin2, Highlight "Ivory"];
outTWindow2 = outTWindow2 = DefineNumber[0, Name "Output/T window 2 [degC]",
DefineNumber[0, Name "Output/T window 2 [degC]",
Visible Flag_ConstraintWin2, Highlight "Ivory"]; Visible Flag_ConstraintWin2, Highlight "Ivory"];
ConvectionCoef = DefineNumber[1000, Name"Surface2/hconv",
ConvectionCoef =
DefineNumber[1000, Name"Surface2/hconv",
Label "Convection coefficient [W/(m^2K)]"]; Label "Convection coefficient [W/(m^2K)]"];
T_Ambiance = T_Ambiance = DefineNumber[20, Name"Surface2/Ambiance temperature [degC]"];
DefineNumber[20, Name"Surface2/Ambiance temperature [degC]"]; T_Dirichlet = DefineNumber[20, Name"Surface1/Imposed temperature [degC]"];
T_Dirichlet =
DefineNumber[20, Name"Surface1/Imposed temperature [degC]"];
Group { Group {
/* Geometrical regions: */ /* Geometrical regions: */
...@@ -175,17 +152,17 @@ Group { ...@@ -175,17 +152,17 @@ Group {
/* Abstract regions: /* Abstract regions:
Vol_Lambda_Ele : volume regions with a thermal conductivity lambda[] Vol_The : volume regions with a thermal conductivity
Sur_Dirichlet_The : Dirichlet bondary condition surface Sur_Dir_The : non-homogeneous Dirichlet boundary condition surface
Sur_Neu_Ele : Neumann bondary condition surface Sur_Neu_The : homogeneous Neumann boundary condition surface
Sur_Convection_The : convective surface q.n = h ( T-Tinf ) Sur_Convection_The : convective surface q.n = h ( T-Tinf )
Vol_Qsource_The : volume heat source regions Vol_Qsource_The : volume heat source regions
Tfloating_The : thermal electrodes Tfloating_The : thermal electrodes
*/ */
Vol_Lambda_The = Region[ {Brick, Window1, Window2, LayerWindow1} ]; Vol_The = Region[ {Brick, Window1, Window2, LayerWindow1} ];
Sur_Dirichlet_The = Region[ Surface_1 ]; Sur_Dir_The = Region[ Surface_1 ];
Sur_Neumann_The = Region[ Surface_3 ]; Sur_Neu_The = Region[ Surface_3 ];
Sur_Convection_The = Region[ Surface_2 ]; Sur_Convection_The = Region[ Surface_2 ];
Vol_Qsource_The = Region[ Window1 ]; Vol_Qsource_The = Region[ Window1 ];
...@@ -200,7 +177,6 @@ Group { ...@@ -200,7 +177,6 @@ Group {
EndIf EndIf
} }
Function { Function {
lambda_Brick = 50.; // steel lambda_Brick = 50.; // steel
lambda[ Brick ] = lambda_Brick; lambda[ Brick ] = lambda_Brick;
...@@ -226,7 +202,7 @@ Function { ...@@ -226,7 +202,7 @@ Function {
Constraint { Constraint {
{ Name Dirichlet_The ; { Name Dirichlet_The ;
Case { Case {
{ Region Sur_Dirichlet_The ; Value T_Dirichlet ; } { Region Sur_Dir_The ; Value T_Dirichlet ; }
} }
} }
{ Name T_Discontinuity ; { Name T_Discontinuity ;
...@@ -260,8 +236,7 @@ Constraint { ...@@ -260,8 +236,7 @@ Constraint {
Integration { Integration {
{ Name Int ; { Name Int ;
Case { Case {
{ { Type Gauss ;
Type Gauss ;
Case { Case {
{ GeoElement Triangle ; NumberOfPoints 4 ; } { GeoElement Triangle ; NumberOfPoints 4 ; }
{ GeoElement Quadrangle ; NumberOfPoints 4 ; } { GeoElement Quadrangle ; NumberOfPoints 4 ; }
...@@ -286,12 +261,9 @@ Jacobian { ...@@ -286,12 +261,9 @@ Jacobian {
} }
Group { Group {
Dom_Hgrad_T = Region[ {Vol_Lambda_The, Dom_Hgrad_T = Region[ {Vol_The, Sur_Convection_The, Sur_Tdisc_The} ];
Sur_Convection_The,
Sur_Tdisc_The} ];
DomainWithSurf_TL_The = DomainWithSurf_TL_The =
ElementsOf[ {Vol_OneSide_The, Sur_Tdisc_The}, ElementsOf[ {Vol_OneSide_The, Sur_Tdisc_The}, OnOneSideOf Sur_Tdisc_The ];
OnOneSideOf Sur_Tdisc_The ];
} }
FunctionSpace { FunctionSpace {
...@@ -336,7 +308,6 @@ FunctionSpace { ...@@ -336,7 +308,6 @@ FunctionSpace {
} }
} }
EndFor EndFor
} }
Formulation { Formulation {
...@@ -350,12 +321,10 @@ Formulation { ...@@ -350,12 +321,10 @@ Formulation {
For i In {1:NbSurface} For i In {1:NbSurface}
{ Name un~{i} ; Type Local ; NameOfSpace FluxLayer~{i} ; } { Name un~{i} ; Type Local ; NameOfSpace FluxLayer~{i} ; }
EndFor EndFor
} }
Equation { Equation {
Integral { [ lambda[] * Dof{d T} , {d T} ] ; Integral { [ lambda[] * Dof{d T} , {d T} ] ;
In Vol_Lambda_The; Integration Int ; Jacobian Vol ; } In Vol_The; Integration Int ; Jacobian Vol ; }
Integral { [ ( lambda[]/thickness[] ) * Dof{Tdisc} , {Tdisc} ] ; Integral { [ ( lambda[]/thickness[] ) * Dof{Tdisc} , {Tdisc} ] ;
In Sur_Tdisc_The; Integration Int ; Jacobian Sur ; } In Sur_Tdisc_The; Integration Int ; Jacobian Sur ; }
...@@ -373,13 +342,12 @@ Formulation { ...@@ -373,13 +342,12 @@ Formulation {
For i In {1:NbSurface} For i In {1:NbSurface}
Integral { [ 0 * Dof{un~{i}} , {un~{i}} ] ; Integral { [ 0 * Dof{un~{i}} , {un~{i}} ] ;
In Vol_Lambda_The ; Integration Int ; Jacobian Vol ; } In Vol_The ; Integration Int ; Jacobian Vol ; }
EndFor EndFor
} }
} }
} }
Resolution { Resolution {
{ Name Thermal_T ; { Name Thermal_T ;
System { System {
...@@ -411,9 +379,9 @@ PostProcessing { ...@@ -411,9 +379,9 @@ PostProcessing {
For i In {1:NbSurface} For i In {1:NbSurface}
{ Name un~{i} ; Value { Local { [ {un~{i}} ] ; { Name un~{i} ; Value { Local { [ {un~{i}} ] ;
In Vol_Lambda_The ; Jacobian Vol ; } } } In Vol_The ; Jacobian Vol ; } } }
{ Name IFlux~{i} ; Value { Integral { [ -lambda[]*{d T} * {d un~{i}} ]; { Name IFlux~{i} ; Value { Integral { [ -lambda[]*{d T} * {d un~{i}} ];
In Vol_Lambda_The ; Jacobian Vol ; Integration Int ; } } } In Vol_The ; Jacobian Vol ; Integration Int ; } } }
EndFor EndFor
} }
...@@ -422,8 +390,8 @@ PostProcessing { ...@@ -422,8 +390,8 @@ PostProcessing {
PostOperation Map_T UsingPost Thermal_T { PostOperation Map_T UsingPost Thermal_T {
If( !Flag_Regularization ) If( !Flag_Regularization )
Print[ Tcont, OnElementsOf Vol_Lambda_The, File "Tcont.pos"] ; Print[ Tcont, OnElementsOf Vol_The, File "Tcont.pos"] ;
Print[ Tdisc, OnElementsOf Vol_Lambda_The, File "Tdisc.pos"] ; Print[ Tdisc, OnElementsOf Vol_The, File "Tdisc.pos"] ;
EndIf EndIf
If(Flag_ConstraintWin2) If(Flag_ConstraintWin2)
...@@ -435,13 +403,13 @@ PostOperation Map_T UsingPost Thermal_T { ...@@ -435,13 +403,13 @@ PostOperation Map_T UsingPost Thermal_T {
EndIf EndIf
For i In {1:NbSurface} For i In {1:NbSurface}
Print[un~{i}, OnElementsOf Vol_Lambda_The, Print[un~{i}, OnElementsOf Vol_The,
File Sprintf("FluxLayer_%g.pos",i)]; File Sprintf("FluxLayer_%g.pos",i)];
Print[ IFlux~{i}[Vol_Lambda_The], OnGlobal, Print[ IFlux~{i}[Vol_The], OnGlobal,
Format TimeTable, File > "Fluxes.dat", Color "Ivory", Format TimeTable, File > "Fluxes.dat", Color "Ivory",
SendToServer Sprintf("Output/Heat flux surface %g [W]", i)]; SendToServer Sprintf("Output/Heat flux surface %g [W]", i)];
EndFor EndFor
Print[ T, OnElementsOf Vol_Lambda_The, File "T.pos" ] ; Print[ T, OnElementsOf Vol_The, File "T.pos" ] ;
Echo[ StrCat["l=PostProcessing.NbViews-1;", Echo[ StrCat["l=PostProcessing.NbViews-1;",
"View[l].IntervalsType = 3;", "View[l].IntervalsType = 3;",
"View[l].NbIso = 30;", "View[l].NbIso = 30;",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment