-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathabout.html
More file actions
73 lines (58 loc) · 2.77 KB
/
about.html
File metadata and controls
73 lines (58 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
layout: default
title: About
---
<div class="center">
<h1>About Nutils</h1>
<p>Nutils is an open source project aimed at the creation of a modern, general
purpose Python programming library for finite element applications. The project
is led by <a href="http://evalf.com">Evalf Computing</a> and is being
developed in close collaboration with academia, most notably the <a
href="http://tue.nl">Technical University of Eindhoven</a>. Nutils is under
active development and is presently in use for both industrial applications and
academic research.
</p>
<figure class="conditionalfloat">
<img src="/images/laplace.png" width="100%">
</figure>
<p>Nutils is MIT licenced and is free to use in any application. It is
important to understand that Nutils is not a ready to use program. It does not
have a user interface and no predetermined functionality. What it is instead is
a collection of high level objects that can be mixed, matched and extended to
build any specific simulation in the form of a Python script. Knowledge of both
computational physics and general programming are required to use Nutils to its
potential.</p>
<p>To illustrate the workflow, the following fully functional script solves
the Laplace problem ∬ ∇v·∇u = ∫ v f on a square domain with mixed Dirichlet
and Neumann boundary conditions, using quadratic spline basis functions and and
8x8 computational grid. The result is as shown in the figure.</p>
{% highlight python %}
from nutils import mesh, function, solver, plot
domain, geom = mesh.rectilinear([8, 8])
# create namespace
ns = function.Namespace()
ns.x = geom
ns.basis = domain.basis('spline', degree=2)
ns.u = 'basis_n ?dofs_n'
# construct residual
res = domain.integral('-basis_n,i u_,i' @ ns, geometry=ns.x, degree=2)
res += domain.boundary['right'].integral('basis_n' @ ns, geometry=ns.x, degree=2)
# construct dirichlet constraints
sqr = domain.boundary['bottom'].integral('u^2' @ ns, geometry=ns.x, degree=4)
cons = solver.optimize('dofs', sqr, droptol=1e-15)
# find dofs such that res == 0
dofs = solver.solve_linear('dofs', res, constrain=cons)
# plot solution
x, u = domain.elem_eval([ns.x, ns.u], ischeme='bezier9', arguments=dict(dofs=dofs), separate=True)
with plot.PyPlot('solution') as plt:
plt.mesh(x, u, cmap='jet')
plt.colorbar()
{% endhighlight %}
<p>More elaborate examples including demonstrations of isogeometric analysis,
the finite cell method, and goal based adaptivity can be found in the <a
href="https://github.com/nutils/nutils/tree/master/examples">examples</a>
directory of the code repository. Installation instructions as well as full API
documentation (in progress) can be found at <a
href="http://docs.nutils.org">docs.nutils.org</a>.<p>
<p>For more information contact <a href="mailto:info@nutils.org">info@nutils.org</a>.</p>
</div>