Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

heat exchanger #693

Merged
merged 43 commits into from
Dec 21, 2023
Merged

heat exchanger #693

merged 43 commits into from
Dec 21, 2023

Conversation

liaoxin2
Copy link
Contributor

PR types

One of New example

PR changes

heat exchanger APIs

Describe

heat exchanger code

Copy link

paddle-bot bot commented Dec 11, 2023

Thanks for your contribution!

Comment on lines 180 to 181
"T_h": cfg.TRAIN.weight
* np.ones([left_data["x"].shape[0], 1], dtype="float32")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

np.full_like代替

Comment on lines 204 to 205
"T_h": cfg.TRAIN.weight
* np.ones([right_data["x"].shape[0], 1], dtype="float32")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

==> np.full_like

examples/heat_exchanger/heat_exchanger.py Outdated Show resolved Hide resolved
examples/heat_exchanger/heat_exchanger.py Show resolved Hide resolved
examples/heat_exchanger/conf/heat_exchanger.yaml Outdated Show resolved Hide resolved
ppsci/equation/pde/__init__.py Outdated Show resolved Hide resolved
ppsci/equation/pde/heat_exchanger.py Outdated Show resolved Hide resolved
ppsci/equation/pde/heat_exchanger.py Outdated Show resolved Hide resolved
ppsci/equation/pde/heat_exchanger.py Outdated Show resolved Hide resolved
ppsci/equation/__init__.py Show resolved Hide resolved
@HydrogenSulfate HydrogenSulfate self-assigned this Dec 16, 2023

Examples:
>>> import ppsci
>>> pde = ppsci.equation.HeatExchanger(1.0,1.0,1.0,1.0,1.0,1.0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

参数之间用逗号隔开

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

参数之间是用逗号隔开的,1.0是一个参数

@@ -20,5 +20,6 @@
- PrecipNet
- UNetEx
- NowcastNet
- PI_DeepONets
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

===> HEDeepONet

NTIME: 20 # number of time steps
NPOINT: 101 # number of points in the domain
NQM: 60 # Number of branch network samples

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

保留一个空行即可

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

train/eval函数里的超参数直接使用cfg.XXX 访问,不需要重新赋值,减少代码行数

}

# set constraint
BC_label = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

变量命名统一用小写

},
ppsci.loss.MSELoss("mean"),
output_expr={
"T_h": lambda out: out["T_c"] - T_cin,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上,整合成一行

equation=equation,
geom=geom,
validator=validator,
)
Copy link
Collaborator

@HydrogenSulfate HydrogenSulfate Dec 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretrained_model_path: null, checkpoint_path: null、eval_with_no_grad: true这三个配置文件中的参数并没有填写在这里

geom=geom,
validator=validator,
pretrained_model_path=cfg.EVAL.pretrained_model_path,
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eval_with_no_grad: true这两个配置文件中的参数并没有填写在这里

from ppsci.arch import mlp


class PI_DeepONets(base.Arch):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

根据这个模型的代码,感觉是比较定制化的热交换DeepONet,可以叫HEDeepONet

@@ -0,0 +1,197 @@
# Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文件名一律小写,改为 he_deeponet.py

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

所有文件里的PI_DeepONets改为HEDeepONets

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个文件是不是多余的,可以删除掉

Copy link
Collaborator

@HydrogenSulfate HydrogenSulfate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@HydrogenSulfate HydrogenSulfate merged commit 0309d51 into PaddlePaddle:develop Dec 21, 2023
3 checks passed
huohuohuohuohuo123 pushed a commit to huohuohuohuohuo123/PaddleScience that referenced this pull request Aug 12, 2024
* add bubble datafile test=develop

* add bubble code test=develop

* add bubble code test=develop

* add bubble code test=develop

* add bubble code

* add bubble data

* add bubble code

* delete mat file

* delete mat file

* bubble code

* delete mat file

* add some modify

* add some modifications

* add some modifications

* add some modifications

* add some modifications

* add some modification

* add some modification

* add some modification

* add some modification

* add some modification

* add some modification(test=document_fix)

* add some modification

* add some modification

* add some modification

* add some modification

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop

* add some code test=develop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants