自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 FDTD一维仿真

FDTD一维仿真本程序演示了一维FDTD仿真。该问题的几何结构是由两个PEC板在y和z维上无限延伸,彼此平行,间隔1米。PEC板之间的空间充满了空气。一个平行于PEC板的电流源片被放置在问题空间的中心。电流源由于z向电流密度Jz在问题空间中激发出场,在时间上具有高斯波形。% Define initial constantseps_0 = 8.854187817e-12; % permittivity of free space mu_0 = 4*pi*1e-7;

2022-01-15 11:29:08 2890

原创 PINN学习记录(3.1)

'''PhyCRNet for solving spatiotemporal PDEs'''import torchimport torch.nn as nnimport torch.optim as optimfrom torch.autograd import Variablefrom torch.optim.lr_scheduler import StepLRimport numpy as npimport matplotlib.pyplot as pltimport scipy.i

2022-01-05 00:50:52 2008 1

原创 burgers equation 1.1公式

公式laplace_operatordef apply_laplacian(mat, dx = 1.0): # dx is inversely proportional to N """This function applies a discretized Laplacian in periodic boundary conditions to a matrix For more information see https://en.wikipedia

2021-12-14 09:59:36 626

原创 PINN学习记录(3.3)

PhyCRNet模型构建完成→TrainLoss\rightarrow Train Loss→TrainLosspart5 Loss1、Conv2dDerivativeclass Conv2dDerivative(nn.Module): def __init__(self, DerFilter, resol, kernel_size=3, name=''): super(Conv2dDerivative, self).__init__() self.res

2021-12-02 14:15:23 849

原创 PINN学习记录3.2

part3 Encoderclass encoder_block(nn.Module): ''' encoder with CNN ''' def __init__(self, input_channels, hidden_channels, input_kernel_size, input_stride, input_padding): super(encoder_block, self).__init__() sel

2021-12-02 09:35:52 780 1

原创 PINN学习记录(2)

PINN学习记录(2)PINN基于解物理的方程的应用,所以我自己学习了一段时间,参考了网上很多的开源项目,末尾会贴出一些,自己总结了一下思路解微分方程1、ODEf′(x)=f(x)f'(x)=f(x)f′(x)=f(x)f(0)=1f(0)=1f(0)=1网络构造这里说明一下,之后用nn.module,来解决,这只是建立一个通用网络import torchimport torch.nn as nnimport numpy as npclass Net(nn.Module):

2021-11-27 12:16:58 6227 3

原创 PINN学习记录(1)

PINN学习记录(1)安装Deepdxe官方链接安装pip install deepxde直接在evns 环境下安装即可在git hub 上下载zip,然后set.up链接:deepxde注意:默认backend 是tensorflow_compact_v1我自己用pytorch ,所以需要更改在C:\Users\admin\.deepxde下更改即可学习例子1、buegers equations(完整代码)(部分代码)def pde(x, y): dy

2021-11-21 11:54:33 7039 7

原创 2021-11-12

解常微分方程利用sympy的odient解ode以二阶为例f(x)={y′′−y+x=0y(0)=y(1)=0 f(x)=\left\{\begin{aligned}y''-y+x & = 0 \\y(0)=y(1) & = 0 \\\end{aligned}\right.f(x)={y′′−y+xy(0)=y(1)​=0=0​已知答案:y′=x−sinh(x)sinh(1)y'=x- \frac {sinh(x)}{sinh(1)}y′=x−sinh(1)sinh

2021-11-12 11:30:44 1033

原创 2021-11-04

pycharm运行报错: Process finished with exit code -1073741819 (0xC0000005)解决方法:亲测有效!!!该死的玩意儿搞了我一下午了家人们,不要不信邪!pip unistall matplotlib再pip install 就能解决!!!步骤1:测试是否是import matplotlib.xxx as plt注释掉它和相关的代码,运行不报错就是它的问题了步骤2:打开anaconda prompt输入activate xxxx(

2021-11-04 00:35:51 215

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除