A Unified Hard-Constraint Framework for Solving Geometrically Complex PDEs Songming Liu1 Zhongkai Hao1 Chengyang Ying1 Hang Su12 Jun Zhu12 Ze Cheng3

2025-04-27 0 0 899.4KB 34 页 10玖币
侵权投诉
A Unified Hard-Constraint Framework for
Solving Geometrically Complex PDEs
Songming Liu1, Zhongkai Hao1, Chengyang Ying1, Hang Su1,2
, Jun Zhu1,2, Ze Cheng3
1Dept. of Comp. Sci. and Tech., Institute for AI, THBI Lab, BNRist Center,
Tsinghua-Bosch Joint ML Center, Tsinghua University
2Peng Cheng Laboratory; Pazhou Laboratory (Huangpu), Guangzhou, China
3Bosch Center for Artificial Intelligence
csuastt@gmail.com
Abstract
We present a unified hard-constraint framework for solving geometrically complex
PDEs with neural networks, where the most commonly used Dirichlet, Neumann,
and Robin boundary conditions (BCs) are considered. Specifically, we first intro-
duce the “extra fields” from the mixed finite element method to reformulate the
PDEs so as to equivalently transform the three types of BCs into linear equations.
Based on the reformulation, we derive the general solutions of the BCs analytically,
which are employed to construct an ansatz that automatically satisfies the BCs.
With such a framework, we can train the neural networks without adding extra
loss terms and thus efficiently handle geometrically complex PDEs, alleviating
the unbalanced competition between the loss terms corresponding to the BCs and
PDEs. We theoretically demonstrate that the “extra fields” can stabilize the training
process. Experimental results on real-world geometrically complex PDEs showcase
the effectiveness of our method compared with state-of-the-art baselines.
1 Introduction
Many fundamental problems in science and engineering (e.g., [
2
,
22
,
32
]) are characterized by partial
differential equations (PDEs) with the solution constrained by boundary conditions (BCs) that are
derived from the physical system of the problem. Among all types of BCs, Dirichlet, Neumann, and
Robin are the most commonly used [
37
]. Figure 1 gives an illustrative example of these three types
of BCs. Furthermore, in practical problems, physical systems can be very geometrically complex
(where the geometry of the definition domain is irregular or has complex structures, e.g., a lithium-ion
battery [
12
], a heat sink [
44
], etc), leading to a large number of BCs. How to solve such PDEs has
become a challenging problem shared by both scientific and industrial communities.
The field of solving PDEs with neural networks has a history of more than 20 years [
7
,
1
,
38
,
9
,
40
].
Such methods are intrinsically mesh-free and therefore can handle high-dimensional as well as
geometrically complex problems more efficiently compared with traditional mesh-based methods,
like the finite element method (FEM). Physical-informed neural network (PINN) [
29
] is one of the
most influential works, where the neural network is trained in the way of taking the residuals of
both PDEs and BCs as multiple terms of the loss function. Although there are many wonderful
improvements such as DPM [14], PINNs still face serious challenges as discussed in the paper [16].
Some theoretical works [
41
,
42
] point out that there exists an unbalanced competition between the
terms of PDEs and BCs, limiting the application of PINNs to geometrically complex problems. To
address this issue, some researchers [
3
,
39
,
21
] have tried to embed BCs into the ansatz. Some of
Corresponding author
36th Conference on Neural Information Processing Systems (NeurIPS 2022).
arXiv:2210.03526v6 [cs.LG] 4 Jun 2023
HEAT
ENVIRONMENT
Dirichlet BC Neumann BC Robin BC
Figure 1: An illustration on three types of BCs. We give an example from heat transfer, where
T=T(x)
is the temperature,
k
is the thermal conductivity, and
h
is the heat transfer coefficient. (1)
The Dirichlet BC specifies the value of the solution at the boundary. Here we assume a constant
temperature
THEAT
at the heat source (
x=x0
). (2) The Neumann BC specifies the value of the
derivative at the boundary. We assume that the right wall (
x=x2
) is adiabatic and impose a zero
normal derivative. (3) The Robin BC is a combination of the first two. And we use it to describe the
heat convection between the heat source and the environment (T) at the surface (x=x2).
them [
17
,
31
] follow the pipeline of the Theory of Connections [
25
], while others [
45
,
13
,
18
] have
considered solving the equivalent variational form of the PDEs. In this way, the neural networks can
automatically satisfy the BCs and no longer require adding corresponding loss terms. Nevertheless,
these methods are only applicable to specific BCs (e.g., Dirichlet BCs, homogeneous BCs, etc) or
geometrically simple PDEs. The key challenge is that the equation forms of the Neumann and Robin
BCs have no analytical solutions in general and are thus difficult to be embedded into the ansatz.
In this paper, we propose a unified hard-constraint framework for all the three most commonly used
BCs (i.e., Dirichlet, Neumann, and Robin BCs). With this framework (see Figure 2 for an illustration),
we are able to construct an ansatz that automatically satisfies the three types of BCs. Therefore, we
can train the model without the losses of these BCs, which alleviates the unbalanced competition
and significantly improves the performance of solving geometrically complex PDEs. Specifically,
we first introduce the extra fields from the mixed finite element method [
23
,
4
]. This technique
substitutes the gradient of a physical quantity with new variables, allowing the BCs to be reformulated
as linear equations. Based on this reformulation, we derive a general continuous solution of the
BCs of simple form, overcoming the challenge that the original BCs cannot be solved analytically.
Using the general solutions obtained, we summarize a paradigm for constructing the hard-constraint
ansatz under time-dependent, multi-boundary, and high-dimensional cases. Besides, in Section 4, we
demonstrate that the technique of extra fields can improve the stability of the training process.
We empirically demonstrate the effectiveness of our method through three parts of experiments.
Firstly, we show the potency of our method in solving geometrically complex PDEs through two
numerical experiments from real-world physical systems of a battery pack and an airfoil. And
our framework achieves a supreme performance compared with advanced baselines, including the
learning rate annealing methods [
41
], domain decomposition-based methods [
11
,
26
], and existing
hard-constraint methods [
34
,
35
]. Second, we select a high-dimensional problem to demonstrate that
our framework can be well applied to high-dimensional cases. Finally, we study the impact of the
extra fields as well as some hyper-parameters and verify our theoretical results in Section 4.
To sum up, we make the following contributions:
We introduce the extra fields to reformulate the PDEs, and theoretically demonstrate that
our reformulation can effectively reduce the instability of the training process.
We propose a unified hard-constraint framework for Dirichlet, Neumann, and Robin BCs,
alleviating the unbalanced competition between losses in physics-informed learning.
Our method has superior performance over state-of-the-art baselines on solving geometri-
cally complex PDEs, as validated by numerical experiments in real-world physical problems.
2
Boundaries
Boundary Conditions
where is the unknown function
Extra fields
Reformulated Boundary Conditions
General Solutions
where is a neural network
Proposed Ansatz
Eq. (11)
Approximation Range of NNs
Ansatz which satisfies
Boundary Conditions
Unbalanced competition
Hypothesis space to explore
with only slightly relaxation
Deduce
Figure 2: A pipeline of the proposed method. In this paper, we consider PDEs with multiple
boundary conditions (BCs) of Dirichlet, Neumann, and Robin. We first introduce the extra fields to
reformulate the BCs as linear equations whose general solutions are deduced. Then, we aggregate the
general solutions for each boundary to obtain our ansatz via Eq.
(11)
. Since the ansatz automatically
satisfies the BCs, we alleviate the unbalanced competition and reduce invalid hypothesis space.
2 Background
2.1 Physics-Informed Neural Networks (PINNs)
We consider the following Laplace’s equation as a motivating example:
u(x1, x2)=0, x1(0,1], x2[0,1],(1a)
u(x1, x2) = g(x2), x1= 0, x2[0,1],(1b)
where
g:RR
is a known fixed function, Eq.
(1a)
gives the form of the PDE, and Eq.
(1b)
is a
Dirichlet boundary condition (BC). A solution to the above problem is a solution to Eq.
(1a)
which
also satisfies Eq. (1b).
Physics-informed neural networks (PINNs) [
29
] employ a neural network
NN(x1, x2;θ)
to approx-
imate the solution, i.e.,
ˆu(x1, x2;θ) = NN(x1, x2;θ)u(x1, x2)
, where
θ
denotes the trainable
parameters of the network. And we learn the parameters
θ
by minimizing the following loss function:
L(θ) = LF(θ) + LB(θ)1
Nf
Nf
X
i=1 ˆu(x(i)
f,1, x(i)
f,2;θ)
2+1
Nb
Nb
X
i=1 ˆu(0, x(i)
b,2;θ)g(x(i)
b,2)
2,(2)
where
LF
is the term restricting
ˆu
to satisfy the PDE (Eq.
(1a)
) while
LB
is the one for the BC
(Eq.
(1b)
),
{x(i)
f= (x(i)
f,1, x(i)
f,2)}Nf
i=1
is a set of
Nf
collocation points sampled in
[0,1]2
, and
{x(i)
b=
(0, x(i)
b,2)}Nb
i=1 is a set of Nbboundary points sampled in x1= 0 x2[0,1].
PINNs have a wide range of applications, including heat [
5
], flow [
24
], and atmosphere [
46
]. However,
PINNs are struggling with some issues on the performance [
16
]. Previous analysis [
41
,
42
] has
demonstrated that the convergence of
LF
can be significantly faster than that of
LB
. This pathology
may lead to nonphysical solutions which do not satisfy the BCs or initial conditions (ICs). Moreover,
for geometrically complex PDEs where the number of BCs is large, this problem is exacerbated and
can seriously affect accuracy, as supported by our experimental results in Table 1.
2.2 Hard-Constraint Methods
One potential approach to overcome this pathology is to embed the BCs into the ansatz in a way
that any instance from the ansatz can automatically satisfy the BCs, as utilized by previous works
[
3
,
27
,
39
,
43
,
34
,
21
,
35
]. We note that the loss terms corresponding to the BCs are no longer needed,
and thus the above pathology is alleviated. These methods are called hard-constraint methods, and
they share a similar formula of the ansatz as:
ˆu(x;θ) = u(x) + l(x)NN(x;θ),(3)
3
where
x
is the coordinate,
is the domain of interest,
u(x)
is the general solution at the boundary
, and l(x)is an extended distance function which satisfies:
l(x) = 0 if x,
>0 otherwise.(4)
In the case of Eq.
(1)
(where
x= (x1, x2)
,
Ω = [0,1]2
), the general solution is exactly
g(x2)
, and
we can use the following ansatz (which automatically satisfies the BC in Eq. (1b)):
ˆu(x1, x2;θ) = g(x2) + x1NN(x1, x2;θ).(5)
However, it is hard to directly extend this method to more general cases of Robin BCs (see Eq.
(7)
),
since we cannot obtain the general solution
u(x)
analytically. Existing attempts are either mesh-
dependent [
10
,
47
], which are time-consuming for high-dimensional and geometrically complex
PDEs, or ad hoc methods for specific (geometrically simple) physical systems [
30
]. It is still lacking
a unified hard-constraint framework for both geometrically complex PDEs and the most commonly
used Dirichlet, Neumann, and Robin BCs.
3 Methodology
We first introduce the problem setup of geometrically complex PDEs considered in this paper and
then reformulate the PDEs via the extra fields, followed by presenting our unified hard-constraint
framework for embedding Dirichlet, Neumann, and Robin BCs into the ansatz.
3.1 Problem Setup
We consider a physical system governed by the following PDEs defined on a geometrically complex
domain: Rd
F[u(x)] = 0,x= (x1, . . . , xd),(6)
where
F= (F1,...,FN)
includes
N
PDE operators which map
u
to a function of
x
,
u
and
u
s
derivatives. Here,
u(x)=(u1(x), . . . , un(x))
is the unknown solution, which represents physical
quantities of interest. For each uj, j = 1, . . . , n, we impose suitable boundary conditions (BCs) as:
aj,i(x)uj+bj,i(x)nj,i(x)· ∇uj=gj,i(x),xγj,i,i= 1, . . . , mj,(7)
where
{γj,i}mj
i=1
are subsets of the boundary
whose closures are disjoint,
aj,i, bj,i :γj,i R
satisfy that
a2
j,i(x) + b2
j,i(x)̸= 0,xγj,i
,
nj,i :γj,i Rd
is the (outward facing) unit normal
of
γj,i
at each location, and
gj,i :γj,i R
. It is noted that Eq.
(7)
represents a Dirichlet BC if
aj,i 1, bj,i 0
, a Neumann BC if
aj,i 0, bj,i 1
, and a Robin BC otherwise. In the following,
we drop some of the subscripts in Eq. (7) for clarity 2.
For such geometrically complex PDEs, if we directly resort to PINNs (see Section 2.1), there would
be a difficult multi-task learning with at least
(Pn
j=1 mj+N)
terms in the loss function. As discussed
in the previous analyses [
41
,
42
], it will severely affect the convergence of the training due to the
unbalanced competition between those loss terms. Hence, in this paper, we will discuss how to
embed the BCs into the ansatz, where every instance automatically satisfies the BCs. However, it is
infeasible to directly follow the pipeline of hard-constraint methods (see Eq.
(3)
) since Eq.
(7)
does
not have a general solution of analytical form. Therefore, a new approach is needed to address this
intractable problem.
3.2 Reformulating PDEs via Extra Fields
In this subsection, we present the general solutions of the BCs, which will be used to construct
the hard-constraint ansatz subsequently. We first introduce the extra fields from the mixed finite
element method [
23
,
4
] to equivalently reformulate the PDEs. Let
pj(x)=(pj1(x), . . . , pjd(x)) =
uj, j = 1, . . . , n. We substitute them into Eq. (6) and Eq. (7) to obtain the equivalent PDEs:
˜
F[u(x),p1(x),...,pn(x)] = 0,x,(8a)
pj(x) = uj,x,j= 1, . . . , n, (8b)
2We simplify γj,i , aj,i(x), bj,i(x),nj,i(x), gj,i(x)to γi, ai(x), bi(x),n(x), gi(x).
4
where
(u(x),p1(x),...,pn(x))
is the solution to the new PDEs,
˜
F= ( ˜
F1,..., ˜
FN)
are the PDE
operators after the reformulation. And for j= 1, . . . , n, we have the corresponding BCs:
ai(x)uj+bi(x)n(x)·pj(x)=gi(x),xγi,i= 1, . . . , mj.(9)
Now, we can see that Eq.
(7)
has been transformed into linear equations with respect to
(uj,pj)
,
which are much easier for us to derive general solutions. Hereinafter, we denote
(uj,pj)
by
˜
pj
, and
the general solution to the BC at γiby ˜
pγi
j= (uγi
j,pγi
j). Next, we will discuss how to obtain ˜
pγi
j.
To obtain the general solution of Eq.
(9)
, the first step is to find a basis
B(x)
of the null space (whose
dimension is
d
), which should include
d
vectors. However, we must emphasize that
B(x)
should be
carefully chosen. Since Eq.
(9)
is parameterized by
x
, for any
xγi
,
B(x)
should always be a basis
of the null space, that is, its columns cannot degenerate into linearly dependent vectors (otherwise it
will not be able to represent all possible solutions). An example of an inadmissible
B(x)
is given in
Appendix A.1.
Generally, for any dimension
dN+
, we believe it is non-trivial to find a simple expression for the
basis. Instead, we prefer to find
(d+ 1)
vectors in the null space,
d
of which are linearly independent
(that way,
B(x)R(d+1)×(d+1)
). We now directly present our construction of the general solution
while leaving a detailed derivation in Appendix A.3.
˜
pγi
j(x;θγi
j) = B(x)NNγi
j(x;θγi
j) + ˜
n(x)˜gi(x),(10)
where
˜
n= (ai, bin)pa2
i+b2
i
,
˜gi=gipa2
i+b2
i
,
NNγi
j:RdRd+1
is a neural network with
trainable parameters θγi
j, and B(x) = Id+1 ˜
n(x)˜
n(x)is the basis we have found (precisely, it
is a set of vectors that always contain a basis of the null space for any
xγi
). Incidentally, in the
case of
d= 1
or
d= 2
, we can find a simpler expression for
B
(see Appendix A.2). We note that
there is no restriction for the architecture of neural networks used and MLPs are chosen as default.
3.3 A Unified Hard-Constraint Framework
With the parameterization of a neural network, Eq.
(10)
can represent any function defined on
γi
,
as long as the function satisfies the BC (see Eq.
(9)
). Since our problem domain contains multiple
boundaries, we need to combine the general solutions corresponding to each boundary
γi
to achieve
an overall approximation. Hence, we construct our ansatz (for each
1jn
separately) as follows:
(ˆuj,ˆ
pj) = l(x)NNmain
j(x;θmain
j) +
mj
X
i=1
exp αilγi(x)˜
pγi
j(x;θγi
j),j= 1, . . . , n, (11)
where
NNmain
j:RdRd+1
is the main neural network with trainable parameters
θmain
j
,
l, lγi, i = 1, . . . , mj
are continuous extended distance functions (similar to Eq.
(4)
), and
αi(i= 1, . . . , mj)are determined by:
αi=βs
minx\γilγi(x),(12)
where
βsR
is a hyper-parameter of the “hardness” in the spatial domain. In Eq.
(11)
, we utilize
extended distance functions to “divide” the problem domain into several parts, where
{˜
pγi
j}mj
i=1
is responsible for the approximation on the boundaries while
NNmain
j
are responsible for internal.
Furthermore, Eq.
(12)
ensures that the importance of
˜
pγi
j
decays to
eβs
on the nearest boundary
from
γi
, so that
˜
pγi
j
does not appear on other boundaries. We provide a theoretical guarantee for the
correctness and approximation ability of Eq.
(11)
in Appendix A.4. Besides, if
ai
,
bi
,
n
or
gi
are
only defined at
γi
, we can extend their definition to
using interpolation techniques or neural
networks (see Appendix A.5). An extension of our framework to the temporal domain is discussed in
Appendix A.6.
Finally, we can train our model with the following loss function:
L=1
Nf
Nf
X
k=1
N
X
j=1 ˜
Fj[ˆ
u(x(k)),ˆ
p1(x(k)),..., ˆ
pn(x(k))]
2
+1
Nf
Nf
X
k=1
n
X
j=1
ˆ
pj(x(k))− ∇ˆuj(x(k))
2
2,
(13)
5
摘要:

AUnifiedHard-ConstraintFrameworkforSolvingGeometricallyComplexPDEsSongmingLiu1,ZhongkaiHao1,ChengyangYing1,HangSu1,2∗,JunZhu1,2∗,ZeCheng31Dept.ofComp.Sci.andTech.,InstituteforAI,THBILab,BNRistCenter,Tsinghua-BoschJointMLCenter,TsinghuaUniversity2PengChengLaboratory;PazhouLaboratory(Huangpu),Guangzho...

展开>> 收起<<
A Unified Hard-Constraint Framework for Solving Geometrically Complex PDEs Songming Liu1 Zhongkai Hao1 Chengyang Ying1 Hang Su12 Jun Zhu12 Ze Cheng3.pdf

共34页,预览5页

还剩页未读, 继续阅读

声明:本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。玖贝云文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知玖贝云文库,我们立即给予删除!
分类:图书资源 价格:10玖币 属性:34 页 大小:899.4KB 格式:PDF 时间:2025-04-27

开通VIP享超值会员特权

  • 多端同步记录
  • 高速下载文档
  • 免费文档工具
  • 分享文档赚钱
  • 每日登录抽奖
  • 优质衍生服务
/ 34
客服
关注