• No results found

Introduction Our choice Example Problem Final slide :-) Python + FEM. Introduction to SFE. Robert Cimrman

N/A
N/A
Protected

Academic year: 2021

Share "Introduction Our choice Example Problem Final slide :-) Python + FEM. Introduction to SFE. Robert Cimrman"

Copied!
47
0
0

Loading.... (view fulltext now)

Full text

(1)

Python + FEM

Introduction to SFE

Robert Cimrman

Department of Mechanics & New Technologies Research Centre University of West Bohemia

Plzeˇn, Czech Republic

(2)

Outline

1 Introduction

Programming Languages Programming Techniques

2 Our choice

Mixing Languages — Best of Both Worlds Python

Software Dependencies

3 Example Problem

Continuous Formulation Weak Formulation Problem Description File

(3)

Programming Languages

1 compiled (fortran, C, C++, Java, . . . )

Pros

speed, speed, speed, . . . , did I sayspeed?

large code base (legacy codes), tradition

Cons

(often) complicated build process, recompile after any change low-level⇒lots of lines to get basic stuff done

code size⇒maintenance problems static!

2 interpreted or scripting (sh, tcl, matlab, perl, ruby, python, . . . ) Pros

no compiling

(very) high-level⇒a few of lines to get (complex) stuff done code size⇒easy maintenance dynamic!

Cons

many are relatively new

(4)

Programming Languages

1 compiled (fortran, C, C++, Java, . . . )

Pros

speed, speed, speed, . . . , did I sayspeed?

large code base (legacy codes), tradition

Cons

(often) complicated build process, recompile after any change low-level⇒lots of lines to get basic stuff done

code size⇒maintenance problems static!

2 interpreted or scripting (sh, tcl, matlab, perl, ruby, python, . . . ) Pros

no compiling

(very) high-level⇒a few of lines to get (complex) stuff done code size⇒easy maintenance dynamic!

Cons

many are relatively new

(5)

Programming Languages

1 compiled (fortran, C, C++, Java, . . . )

Pros

speed, speed, speed, . . . , did I sayspeed?

large code base (legacy codes), tradition

Cons

(often) complicated build process, recompile after any change low-level⇒lots of lines to get basic stuff done

code size⇒maintenance problems static!

2 interpreted or scripting (sh, tcl, matlab, perl, ruby, python, . . . ) Pros

no compiling

(very) high-level⇒a few of lines to get (complex) stuff done code size⇒easy maintenance dynamic!

Cons

many are relatively new

(6)

Programming Languages

1 compiled (fortran, C, C++, Java, . . . )

Pros

speed, speed, speed, . . . , did I sayspeed?

large code base (legacy codes), tradition

Cons

(often) complicated build process, recompile after any change low-level⇒lots of lines to get basic stuff done

code size⇒maintenance problems static!

2 interpreted or scripting (sh, tcl, matlab, perl, ruby, python, . . . )

Pros

no compiling

(very) high-level⇒a few of lines to get (complex) stuff done code size⇒easy maintenance dynamic!

Cons

many are relatively new

(7)

Programming Languages

1 compiled (fortran, C, C++, Java, . . . )

Pros

speed, speed, speed, . . . , did I sayspeed?

large code base (legacy codes), tradition

Cons

(often) complicated build process, recompile after any change low-level⇒lots of lines to get basic stuff done

code size⇒maintenance problems static!

2 interpreted or scripting (sh, tcl, matlab, perl, ruby, python, . . . )

Pros

no compiling

(very) high-level⇒a few of lines to get (complex) stuff done code size⇒easy maintenance dynamic!

Cons

many are relatively new

(8)

Programming Languages

1 compiled (fortran, C, C++, Java, . . . )

Pros

speed, speed, speed, . . . , did I sayspeed?

large code base (legacy codes), tradition

Cons

(often) complicated build process, recompile after any change low-level⇒lots of lines to get basic stuff done

code size⇒maintenance problems static!

2 interpreted or scripting (sh, tcl, matlab, perl, ruby, python, . . . )

Pros

no compiling

(very) high-level⇒a few of lines to get (complex) stuff done code size⇒easy maintenance dynamic!

Cons

many are relatively new

(9)
(10)

Example C Code

c h a r s [ ] = ” s e l t u d y , mel dudy . a s e l o p r a v d u t u d y . ” ;

i n t s t r f i n d (c h a r ∗s t r , c h a r ∗t g t )

{

i n t t l e n = s t r l e n ( t g t ) ;

i n t max = s t r l e n ( s t r ) − t l e n ;

r e g i s t e r i n t i ;

f o r ( i = 0 ; i < max ; i ++){

i f ( s t r n c m p (& s t r [ i ] , t g t , t l e n ) = = 0 )

r e t u r n i ;

}

r e t u r n −1;

} i n t i 1 ;

i 1 = s t r f i n d ( s , ” t u d y ” ) ; p r i n t f ( ”%d\n ” , i 1 ) ;

(11)

Programming Techniques

Random remarks: spaghetti code modular programming OOP

design patterns(gang-of-four, GO4) post-OOP — dynamic languages

(12)

Programming Techniques

Random remarks: spaghetti code modular programming OOP

design patterns(gang-of-four, GO4) post-OOP — dynamic languages

(13)

Mixing Languages — Best of Both Worlds

Low level: C

FE matrix evaluations

costly mesh-related functions (listing faces, edges, surface generation, . . . )

. . .

can use alsofortran

+

High level: Python

www.python.org “batteries included” logic of the code

configuration files! probleminputfiles!

(14)

Mixing Languages — Best of Both Worlds

Low level: C

FE matrix evaluations

costly mesh-related functions (listing faces, edges, surface generation, . . . )

. . .

can use alsofortran

+

High level: Python

www.python.org “batteries included” logic of the code

configuration files!

(15)

Python I

Pythonris a dynamic object-oriented programming language that can be used for many kinds of software

development. It offers strong support for integration with other languages and tools, comes with extensive standard libraries, and can be learned in a few days. Many Python programmers report substantial productivity gains and feel the language encourages the development of higher quality, more maintainable code.

. . .

(16)

Python II

1.1.16 Why is it called Python?

At the same time he began implementing Python, Guido van Rossum was also reading the published scripts from ”Monty Python’s Flying Circus” (a BBC comedy series from the seventies, in the unlikely case you didn’t know). It occurred to him that he needed a name that was short, unique, and slightly mysterious, so he decided to call the language Python.

1.1.17 Do I have to like ”Monty Python’s Flying Circus”?

No, but it helps. :)

(17)

Python III

NASA uses Python. . .

. . . so does Rackspace, Industrial Light and Magic, AstraZeneca, Honeywell, and many others.

(18)

Python III

NASA uses Python. . .

. . . so does Rackspace, Industrial Light and Magic, AstraZeneca, Honeywell, and many others.

(19)

Software Dependencies

1 libraries & modules

➢ SciPy: free (BSD license) collection of numerical computing libraries for Python

enables Matlab-like array/matrix manipulations and indexing ➢ UMFPACK: very fast direct solver for sparse systems

Python wrappers are part of SciPy :-)

➢ output files (results) and data files inHDF5:

general purpose library and file format for storing scientific data, efficient storage and I/O

. . . viaPyTables

➢ misc: Pyparsing, Matplotlib 2 tools

➢ SWIG: automatic generation of Python-C interface code

➢ Medit: simple mesh and data viewer

➢ ParaView: VTK-based advanced mesh and data viewer in Tcl/Tk

(20)

Software Dependencies

1 libraries & modules

➢ SciPy: free (BSD license) collection of numerical computing

libraries for Python

enables Matlab-like array/matrix manipulations and indexing ➢ UMFPACK: very fast direct solver for sparse systems

Python wrappers are part of SciPy :-) ➢ output files (results) and data files inHDF5:

general purpose library and file format for storing scientific data, efficient storage and I/O

. . . viaPyTables

➢ misc: Pyparsing, Matplotlib

2 tools

➢ SWIG: automatic generation of Python-C interface code

➢ Medit: simple mesh and data viewer

➢ ParaView: VTK-based advanced mesh and data viewer in Tcl/Tk

(21)

Software Dependencies

1 libraries & modules

➢ SciPy: free (BSD license) collection of numerical computing

libraries for Python

enables Matlab-like array/matrix manipulations and indexing ➢ UMFPACK: very fast direct solver for sparse systems

Python wrappers are part of SciPy :-) ➢ output files (results) and data files inHDF5:

general purpose library and file format for storing scientific data, efficient storage and I/O

. . . viaPyTables

➢ misc: Pyparsing, Matplotlib 2 tools

➢ SWIG: automatic generation of Python-C interface code

➢ Medit: simple mesh and data viewer

➢ ParaView: VTK-based advanced mesh and data viewer in Tcl/Tk

(22)

Software Dependencies

1 libraries & modules

➢ SciPy: free (BSD license) collection of numerical computing

libraries for Python

enables Matlab-like array/matrix manipulations and indexing ➢ UMFPACK: very fast direct solver for sparse systems

Python wrappers are part of SciPy :-)

➢ output files (results) and data files inHDF5:

general purpose library and file format for storing scientific data, efficient storage and I/O

. . . viaPyTables

➢ misc: Pyparsing, Matplotlib 2 tools

➢ SWIG: automatic generation of Python-C interface code

➢ Medit: simple mesh and data viewer

➢ ParaView: VTK-based advanced mesh and data viewer in Tcl/Tk

(23)

Software Dependencies

1 libraries & modules

➢ SciPy: free (BSD license) collection of numerical computing

libraries for Python

enables Matlab-like array/matrix manipulations and indexing ➢ UMFPACK: very fast direct solver for sparse systems

Python wrappers are part of SciPy :-)

➢ output files (results) and data files inHDF5:

general purpose library and file format for storing scientific data, efficient storage and I/O

. . . viaPyTables

➢ misc: Pyparsing, Matplotlib

2 tools

➢ SWIG: automatic generation of Python-C interface code ➢ Medit: simple mesh and data viewer

➢ ParaView: VTK-based advanced mesh and data viewer in Tcl/Tk

(24)

Software Dependencies

1 libraries & modules

➢ SciPy: free (BSD license) collection of numerical computing

libraries for Python

enables Matlab-like array/matrix manipulations and indexing ➢ UMFPACK: very fast direct solver for sparse systems

Python wrappers are part of SciPy :-)

➢ output files (results) and data files inHDF5:

general purpose library and file format for storing scientific data, efficient storage and I/O

. . . viaPyTables

➢ misc: Pyparsing, Matplotlib

2 tools

➢ SWIG: automatic generation of Python-C interface code

➢ Medit: simple mesh and data viewer

➢ ParaView: VTK-based advanced mesh and data viewer in Tcl/Tk

(25)

Software Dependencies

1 libraries & modules

➢ SciPy: free (BSD license) collection of numerical computing

libraries for Python

enables Matlab-like array/matrix manipulations and indexing ➢ UMFPACK: very fast direct solver for sparse systems

Python wrappers are part of SciPy :-)

➢ output files (results) and data files inHDF5:

general purpose library and file format for storing scientific data, efficient storage and I/O

. . . viaPyTables

➢ misc: Pyparsing, Matplotlib

2 tools

➢ SWIG: automatic generation of Python-C interface code

➢ Medit: simple mesh and data viewer

➢ ParaView: VTK-based advanced mesh and data viewer in Tcl/Tk

(26)

Shape Optimization in Incompressible Flow Problems

Objective Function

ΨΓ(u)≡

ν 2

Z

Ωc

|∇u|2−→min (1)

minimize gradients of solution (e.g. losses) in Ωc ⊂Ω

by moving design boundaryΓ⊂∂Ω perturbation of Γ by vector fieldV

Ω(t) = Ω +{tV(x)}x∈Ω where V= 0 in ¯Ωc∪∂Ω\Γ (2)

Γin Γ

out ΓD

ΓD

ΓC ΩC ΩD

(27)

Shape Optimization in Incompressible Flow Problems

Objective Function

ΨΓ(u)≡

ν 2

Z

Ωc

|∇u|2−→min (1)

minimize gradients of solution (e.g. losses) in Ωc ⊂Ω

by moving design boundaryΓ⊂∂Ω

perturbation of Γ by vector fieldV

Ω(t) = Ω +{tV(x)}x∈Ω where V= 0 in ¯Ωc∪∂Ω\Γ (2)

Γin Γ

out ΓD

ΓD

ΓC ΩC ΩD

(28)

Shape Optimization in Incompressible Flow Problems

Objective Function

ΨΓ(u)≡

ν 2

Z

Ωc

|∇u|2−→min (1)

minimize gradients of solution (e.g. losses) in Ωc ⊂Ω

by moving design boundaryΓ⊂∂Ω

perturbation of Γ by vector fieldV

Ω(t) = Ω +{tV(x)}x∈Ω where V= 0 in ¯Ωc∪∂Ω\Γ (2)

Γin Γ

out ΓD

ΓD

ΓC ΩC ΩD

(29)

Appetizer

flow and spline boxes, left: initial, right: final

(30)

Continuous Formulation

laminar steady state incompressibleNavier-Stokes equations

−ν∇2u+u· ∇u+p = 0 in Ω (3)

∇ ·u = 0 in Ω (4)

boundary conditions

u=u0 on Γin −pn+ν∂u

∂n =−pn¯ on Γout

u= 0 on Γwalls

(5)

adjoint equations for computing the adjoint solutionw: −ν∇2w+∇u·wu· ∇w− ∇r =χΩ

cν∇

2u in Ω ∇ ·w = 0 in Ω (6) w = 0 on Γ ∪Γ andχ is the characteristic function of Ω

(31)

Continuous Formulation

laminar steady state incompressibleNavier-Stokes equations

−ν∇2u+u· ∇u+p = 0 in Ω (3)

∇ ·u = 0 in Ω (4)

boundary conditions

u=u0 on Γin −pn+ν∂u

∂n =−pn¯ on Γout

u= 0 on Γwalls

(5)

adjoint equations for computing the adjoint solutionw:

−ν∇2w+u·wu· ∇w− ∇r =χ Ωcν∇

2u in Ω

∇ ·w = 0 in Ω (6)

(32)

Weak Formulation

state problem: find u, p (from suitable function spaces) such that

Z

ν∇v :∇u+

Z

(u· ∇u)·v− Z

p∇ ·v=− Z

Γout

¯

pv·n ∀v ∈V0,

Z

q∇ ·u= 0 ∀q∈Q

(7)

adjoint equations: find w, r (from suitable function spaces) such that

Z

ν∇v :∇w+

Z

(v· ∇u)·w+

Z

(u· ∇v)·w+

Z

Ω r∇ ·v =−

Z

Ωc

ν∇v :∇u ∀v ∈V0,

Z

q∇ ·w = 0 ∀q∈Q

(33)

Weak Formulation

state problem: find u, p (from suitable function spaces) such that

Z

ν∇v :∇u+

Z

(u· ∇u)·v− Z

p∇ ·v=− Z

Γout

¯

pv·n ∀v ∈V0,

Z

q∇ ·u= 0 ∀q∈Q

(7)

adjoint equations: find w, r (from suitable function spaces) such that

Z

ν∇v :∇w+

Z

(v· ∇u)·w+

Z

(u· ∇v)·w+

Z

Ω r∇ ·v

=−

Z

Ωc

ν∇v :∇u ∀v ∈V0,

Z

q∇ ·w = 0 ∀q∈Q

(34)

Weak Formulation

state problem: find u, p (from suitable function spaces) such that

Z

ν∇v :∇u+

Z

(u· ∇u)·v− Z

p∇ ·v=− Z

Γout

¯

pv·n ∀v ∈V0,

Z

q∇ ·u= 0 ∀q∈Q

(7)

adjoint equations: find w, r (from suitable function spaces) such that

Z

ν∇v :∇w+

Z

(v· ∇u)·w+

Z

(u· ∇v)·w+

Z

Ω r∇ ·v

=−

Z

Ωc

ν∇v :∇u ∀v ∈V0,

Z

q∇ ·w = 0 ∀q∈Q

(35)

Problem Description File I

a regular python file ⇒all python machinery is accessible!

requires/recognizes severalkeywordsto define mesh

regions→subdomains, boundaries, characteristic functions, . . . boundary conditions→Dirichlet

fields→field approximation per subdomain variables→unknown fields, test fields, parameters equations

materials→constitutive relations, e.g. newton fluid, elastic solid, . . . solver parameters→nonlinear solver, flow solver, optimization solver, . . .

(36)

Problem Description File I

a regular python file ⇒all python machinery is accessible!

requires/recognizes severalkeywordsto define

mesh

regions→subdomains, boundaries, characteristic functions, . . . boundary conditions→Dirichlet

fields→field approximation per subdomain variables→unknown fields, test fields, parameters equations

materials→constitutive relations, e.g. newton fluid, elastic solid, . . . solver parameters→nonlinear solver, flow solver, optimization solver, . . .

(37)

Problem Description File II

mesh

f i l e N a m e m e s h = ’ s i m p l e . mesh ’

regions

r e g i o n 1 0 0 0 = {

’ name ’ : ’ Omega ’ ,

’ s e l e c t ’ : ’ e l e m e n t s o f g r o u p 6 ’ ,

}

r e g i o n 0 = {

’ name ’ : ’ W a l l s ’ ,

’ s e l e c t ’ : ’ n o d e s o f s u r f a c e −n r . O u t l e t ’ ,

}

r e g i o n 1 = {

’ name ’ : ’ I n l e t ’ ,

’ s e l e c t ’ : ’ n o d e s by c i n c ( x , y , z , 0 ) ’ ,

}

r e g i o n 2 = {

’ name ’ : ’ O u t l e t ’ ,

’ s e l e c t ’ : ’ n o d e s by c i n c ( x , y , z , 1 ) ’ ,

}

r e g i o n 1 0 0 = {

’ name ’ : ’ Omega C ’ , # C o n t r o l domain .

’ s e l e c t ’ : ’ n o d e s i n ( x > −25.9999 e−3) & ( x < −18.990 e−3 ) ’ ,

}

r e g i o n 1 0 1 = {

(38)

Problem Description File III

fields

f i e l d 1 ={

’ name ’ : ’ 3 v e l o c i t y ’ , ’ dim ’ : ( 3 , 1 ) ,

’ f l a g s ’ : ( ’ BQP’ , ) ,

’ b a s e s ’ : ( ( ’ Omega ’ , ’ 3 4 P1B ’ ) , )

}

f i e l d 2 ={

’ name ’ : ’ p r e s s u r e ’ , ’ dim ’ : ( 1 , 1 ) , ’ f l a g s ’ : ( ) ,

’ b a s e s ’ : ( ( ’ Omega ’ , ’ 3 4 P 1 ’ ) , )

}

variables v a r i a b l e s ={

’ u ’ : ( ’ f i e l d ’ , ’ p a r a m e t e r ’ , ’ 3 v e l o c i t y ’ , ( 3 , 4 , 5 ) ) , ’ w 0 ’ : ( ’ f i e l d ’ , ’ p a r a m e t e r ’ , ’ 3 v e l o c i t y ’ , ( 3 , 4 , 5 ) ) , ’w ’ : ( ’ f i e l d ’ , ’ unknown ’ , ’ 3 v e l o c i t y ’ , ( 3 , 4 , 5 ) , 0 ) , ’ v ’ : ( ’ f i e l d ’ , ’ t e s t ’ , ’ 3 v e l o c i t y ’ , ( 3 , 4 , 5 ) , ’ w ’ ) , ’ p ’ : ( ’ f i e l d ’ , ’ p a r a m e t e r ’ , ’ p r e s s u r e ’ , ( 9 , ) ) , ’ r ’ : ( ’ f i e l d ’ , ’ unknown ’ , ’ p r e s s u r e ’ , ( 9 , ) , 1 ) , ’ q ’ : ( ’ f i e l d ’ , ’ t e s t ’ , ’ p r e s s u r e ’ , ( 9 , ) , ’ r ’ ) , ’ Nu ’ : ( ’ f i e l d ’ , ’ m e s h V e l o c i t y ’ , ’ p r e s s u r e ’ , ( 9 , ) ) ,

(39)

Problem Description File III

fields

f i e l d 1 ={

’ name ’ : ’ 3 v e l o c i t y ’ , ’ dim ’ : ( 3 , 1 ) ,

’ f l a g s ’ : ( ’ BQP’ , ) ,

’ b a s e s ’ : ( ( ’ Omega ’ , ’ 3 4 P1B ’ ) , )

}

f i e l d 2 ={

’ name ’ : ’ p r e s s u r e ’ , ’ dim ’ : ( 1 , 1 ) , ’ f l a g s ’ : ( ) ,

’ b a s e s ’ : ( ( ’ Omega ’ , ’ 3 4 P 1 ’ ) , )

}

variables

v a r i a b l e s ={

’ u ’ : ( ’ f i e l d ’ , ’ p a r a m e t e r ’ , ’ 3 v e l o c i t y ’ , ( 3 , 4 , 5 ) ) , ’ w 0 ’ : ( ’ f i e l d ’ , ’ p a r a m e t e r ’ , ’ 3 v e l o c i t y ’ , ( 3 , 4 , 5 ) ) , ’w ’ : ( ’ f i e l d ’ , ’ unknown ’ , ’ 3 v e l o c i t y ’ , ( 3 , 4 , 5 ) , 0 ) , ’ v ’ : ( ’ f i e l d ’ , ’ t e s t ’ , ’ 3 v e l o c i t y ’ , ( 3 , 4 , 5 ) , ’ w ’ ) , ’ p ’ : ( ’ f i e l d ’ , ’ p a r a m e t e r ’ , ’ p r e s s u r e ’ , ( 9 , ) ) , ’ r ’ : ( ’ f i e l d ’ , ’ unknown ’ , ’ p r e s s u r e ’ , ( 9 , ) , 1 ) , ’ q ’ : ( ’ f i e l d ’ , ’ t e s t ’ , ’ p r e s s u r e ’ , ( 9 , ) , ’ r ’ ) , ’ Nu ’ : ( ’ f i e l d ’ , ’ m e s h V e l o c i t y ’ , ’ p r e s s u r e ’ , ( 9 , ) ) ,

(40)

Problem Description File IV

Dirichlet BC

e b c ={

’ W a l l s ’ : ( ( ’ W a l l s ’ , ( 3 , 4 , 5 ) , 0 . 0 ) , ) , ’ I n l e t ’ : ( ( ’ V e l o c i t y I n l e t x ’ , ( 4 , ) , 1 . 0 ) ,

( ’ V e l o c i t y I n l e t y z ’ , ( 3 , 5 ) , 0 . 0 ) ) ,

}

state equations (compare with (7)) e q u a t i o n s ={

’ b a l a n c e ’ :

”””+ d w d i v g r a d . Omega ( f l u i d , v , w ) + d w c o n v e c t . Omega ( v , w )

− d w g r a d . Omega ( v , r )

=− d w s u r f a c e l t r . O u t l e t ( b p r e s s , v ) ” ” ” , ’ i n c o m p r e s s i b i l i t y ’ :

””” d w d i v . Omega ( q , w ) = 0 ” ” ” ,

(41)

Problem Description File IV

Dirichlet BC

e b c ={

’ W a l l s ’ : ( ( ’ W a l l s ’ , ( 3 , 4 , 5 ) , 0 . 0 ) , ) , ’ I n l e t ’ : ( ( ’ V e l o c i t y I n l e t x ’ , ( 4 , ) , 1 . 0 ) ,

( ’ V e l o c i t y I n l e t y z ’ , ( 3 , 5 ) , 0 . 0 ) ) ,

}

state equations (compare with (7))

e q u a t i o n s ={

’ b a l a n c e ’ :

”””+ d w d i v g r a d . Omega ( f l u i d , v , w ) + d w c o n v e c t . Omega ( v , w )

− d w g r a d . Omega ( v , r )

=− d w s u r f a c e l t r . O u t l e t ( b p r e s s , v ) ” ” ” , ’ i n c o m p r e s s i b i l i t y ’ :

””” d w d i v . Omega ( q , w ) = 0 ” ” ” ,

(42)

Problem Description File V

adjoint equations (compare with (8))

e q u a t i o n s a d j o i n t = {

’ b a l a n c e ’ :

”””+ d w d i v g r a d . Omega ( f l u i d , v , w ) + d w a d j c o n v e c t 1 . Omega ( v , w , u ) + d w a d j c o n v e c t 2 . Omega ( v , w , u ) + d w g r a d . Omega ( v , r )

=− d w a d j d i v g r a d 2 . Omega C ( one , f l u i d , v , u ) ” ” ” , ’ i n c o m p r e s s i b i l i t y ’ :

””” d w d i v . Omega ( q , w ) = 0 ” ” ” ,

}

materials m a t e r i a l 2 = {

’ name ’ : ’ f l u i d ’ , ’ mode ’ : ’ h e r e ’ , ’ r e g i o n ’ : ’ Omega ’ , ’ v i s c o s i t y ’ : 1 . 2 5 e−1,

}

m a t e r i a l 1 0 0 = {

’ name ’ : ’ b p r e s s ’ , ’ mode ’ : ’ h e r e ’ , ’ r e g i o n ’ : ’ Omega ’ , ’ v a l ’ : 0 . 0 ,

(43)

Problem Description File V

adjoint equations (compare with (8))

e q u a t i o n s a d j o i n t = {

’ b a l a n c e ’ :

”””+ d w d i v g r a d . Omega ( f l u i d , v , w ) + d w a d j c o n v e c t 1 . Omega ( v , w , u ) + d w a d j c o n v e c t 2 . Omega ( v , w , u ) + d w g r a d . Omega ( v , r )

=− d w a d j d i v g r a d 2 . Omega C ( one , f l u i d , v , u ) ” ” ” , ’ i n c o m p r e s s i b i l i t y ’ :

””” d w d i v . Omega ( q , w ) = 0 ” ” ” ,

}

materials

m a t e r i a l 2 = {

’ name ’ : ’ f l u i d ’ , ’ mode ’ : ’ h e r e ’ , ’ r e g i o n ’ : ’ Omega ’ , ’ v i s c o s i t y ’ : 1 . 2 5 e−1,

}

m a t e r i a l 1 0 0 = {

’ name ’ : ’ b p r e s s ’ , ’ mode ’ : ’ h e r e ’ , ’ r e g i o n ’ : ’ Omega ’ , ’ v a l ’ : 0 . 0 ,

(44)

Yes, the final slide!

What is done

basic FE element engine

approximations up to P2 on simplexes (possibly with bubble)

Q1 tensor-product

approximation on rectangles

handling of fields and variables

boundary conditions, DOF handling

FE assembling

equations, terms, regions materials, material caches generic solvers (Newton iteration, direct linear system solution)

What is not done

general FE engine, with symbolic evaluation (`a la SyFi - merge it?) documentation, unit tests organization of solvers

fast problem-specific solvers parallelization of both assembling and solving

use PETSC? What will not be done (?)

GUI

real symbolic parsing/evaluation of equations

(45)

Yes, the final slide!

What is done

basic FE element engine

approximations up to P2 on simplexes (possibly with bubble)

Q1 tensor-product

approximation on rectangles

handling of fields and variables

boundary conditions, DOF handling

FE assembling

equations, terms, regions materials, material caches generic solvers (Newton iteration, direct linear system solution)

What is not done

general FE engine, with symbolic

evaluation (`a la SyFi - merge it?)

documentation, unit tests organization of solvers

fast problem-specific solvers

parallelization of both assembling and solving

use PETSC?

What will not be done (?) GUI

real symbolic parsing/evaluation of equations

(46)

Yes, the final slide!

What is done

basic FE element engine

approximations up to P2 on simplexes (possibly with bubble)

Q1 tensor-product

approximation on rectangles

handling of fields and variables

boundary conditions, DOF handling

FE assembling

equations, terms, regions materials, material caches generic solvers (Newton iteration, direct linear system solution)

What is not done

general FE engine, with symbolic

evaluation (`a la SyFi - merge it?)

documentation, unit tests organization of solvers

fast problem-specific solvers

parallelization of both assembling and solving

use PETSC?

What will not be done (?)

GUI

real symbolic parsing/evaluation of equations

(47)

References

Related documents

The City of Buffalo shall be named as an additional insured and certificate holder under the General Liability, including any Excess/Umbrella Liability policy, and/or Special

In order to compare conventional alabaster (CaSO 4 Æ 0.15 H 2 O as shown by X-ray diffraction) to nano-gypsum derived from anhydrite nano- particles (Figure 1), the preparation

Modeling problems Learning time: 7h 30m Learning time: 125h 30m Large group/Theory: 4h Self study : 3h 30m Large group/Theory: 20h Small group/Laboratory: 28h Guided activities:

l.Ifyou'r€ hrppy aod you know it Ifyou're hlppI.nd you know it Ifyou'rehappl and Jou kno$ it Thenyour flce will srreh sho$ it Irlou're happr- utrdyou knos ir. 2.Iflou're happy

Like the human eye, the relative sensitivity of a photoconductive cell is dependent on the wavelength (color) of the incident light. Each photoconductor material

Possible approaches to improve the population-level data capture of information needed to evaluate precision medicine in real-world clinical settings include the follow- ing:

The contribution of this research includes: a bibliometric analysis of the papers that focus on risk management in megaprojects; a systematization and classification of the risks; tw