File tree Expand file tree Collapse file tree 6 files changed +11
-8
lines changed Expand file tree Collapse file tree 6 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 1
1
# 2D-Darcy
2
2
3
+ <a href =" https://aistudio.baidu.com/aistudio/projectdetail/6184070?contributionType=1&sUid=438690&shared=1&ts=1684239806160 " class =" md-button md-button--primary " style >AI Studio快速体验</a >
4
+
3
5
## 1. 问题简介
4
6
5
7
2D-Darcy,达西渗流(Darcy flow)的一种,流体在多孔介质中流动时,渗流速度小,流动服从达西定律,渗流速度和压力梯度之间呈线性关系,这种流动称为线性渗流。
@@ -107,7 +109,7 @@ examples/darcy/darcy2d.py:52:69
107
109
108
110
``` py linenums="70"
109
111
-- 8 < --
110
- examples/ darcy/ darcy2d.py:70 :81
112
+ examples/ darcy/ darcy2d.py:70 :117
111
113
-- 8 < --
112
114
```
113
115
@@ -121,6 +123,14 @@ lambda _in: np.sin(2.0 * np.pi * _in["x"]) * np.cos(2.0 * np.pi * _in["y"])
121
123
122
124
` BoundaryConstraint ` 类其他参数的含义与 ` InteriorConstraint ` 基本一致,这里不再介绍。
123
125
126
+ 在微分方程约束、边界约束、初值约束构建完毕之后,以我们刚才的命名为关键字,封装到一个字典中,方便后续访问。
127
+
128
+ ``` py linenums="118"
129
+ -- 8 < --
130
+ examples/ ldc/ ldc2d_steady_Re10.py:118 :125
131
+ -- 8 < --
132
+ ```
133
+
124
134
### 3.5 超参数设定
125
135
126
136
接下来我们需要指定训练轮数和学习率,此处我们按实验经验,使用一万轮训练轮数。
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- import types
16
15
from typing import Any
17
16
from typing import Callable
18
17
from typing import Dict
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- import types
16
15
from typing import Callable
17
16
from typing import Dict
18
17
from typing import Optional
Original file line number Diff line number Diff line change 15
15
from typing import Dict
16
16
from typing import Optional
17
17
from typing import Tuple
18
- from typing import Union
19
18
20
19
import numpy as np
21
20
22
21
import ppsci .utils .misc as misc
23
22
from ppsci .geometry import geometry
24
- from ppsci .utils import reader
25
23
26
24
27
25
class PointCloud (geometry .Geometry ):
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- import types
16
15
from typing import Any
17
16
from typing import Callable
18
17
from typing import Dict
Original file line number Diff line number Diff line change 21
21
import numpy as np
22
22
import paddle
23
23
24
- from ppsci .utils import logger
25
- from ppsci .utils import misc
26
24
from ppsci .visualize import base
27
25
from ppsci .visualize import plot
28
26
from ppsci .visualize import vtu
You can’t perform that action at this time.
0 commit comments