Hard Rod Fluid Analytical Solution in .npy (For Operator learning)
收藏资源简介:
Hard rod fluid with diameter of 1.0 between 2 walls with distance L+2d=10.0,under different chemical potential (mu) and external potential (V_ext(x)), with a sampling distance dz=0.1. Data are stored as numpy structured ndarrays, each npy file store one type of data. The ndarrays has the shape of (n_sample,n_grid), with 4 fields:the position "z", the density profile "rho", the local chemical potential "muloc"the one-body direct correlation function "c1".Where muloc(z)=mu-V_ext(z) In Operator Learning, I've tried the mapping of rho to c1 as well as muloc to rho. dataload.py contains some functions used for loading datadata_model_train.py contains the read-in function for model-training data. data_4groups.npy saves 8000 data, with 2000 in each group, generated from the following external potentials:group 1: V_ext=0 group 2: V_binary[z] = -epsilon*((a/(z+a/2))^3+(a/(L+a/2-z))^3)group 3: V_binary[z] = -mg*zgroup 4: V_binary[z] = -u0*(abs(z/z0))^a0with mu, epsilon, a, mg, u0, z0, a0 are adjustable constants of the potential data_mixed23.npy saves 2000 data, generated from the following external potentials: V_binary[z] = -epsilon*((a/(z+a/2))^3+(a/(L+a/2-z))^3) -mg*z Folders are taped in .zip files. Folder "~/R_data_generator" stores the generator of the data, analytical solution of 1D hard rod fluid.Folder "~/Rdata" contains same data in .Rdata file, as R matrixsFolder "~/R2py" contains the script to generate .npy file from .Rdata file
间距为L+2d=10.0的两平行壁间的直径1.0硬杆流体(hard rod fluid),在不同化学势(chemical potential,μ)与外势V_ext(x)条件下生成,采样步长为dz=0.1。 数据以numpy结构化数组(numpy structured ndarray)存储,每个.npy文件存储一类数据。该数组形状为(n_sample, n_grid),包含4个字段:位置z、密度分布rho、局域化学势muloc以及一体直接相关函数c1。其中局域化学势满足muloc(z)=μ - V_ext(z)。 在算子学习(Operator Learning)中,本研究已尝试了rho到c1以及muloc到rho的映射任务。 "dataload.py"文件包含若干用于数据加载的函数;"data_model_train.py"文件则包含模型训练数据的读入函数。 "data_4groups.npy"文件共存储8000组数据,分为4组,每组2000组,分别由以下外势生成: 组1:V_ext=0 组2:V_binary[z] = -ε·[(a/(z+a/2))³ + (a/(L+a/2 - z))³] 组3:V_binary[z] = -mg·z 组4:V_binary[z] = -u₀·(|z/z₀|)^a₀ 其中μ、ε、a、mg、u₀、z₀、a₀均为该外势的可调常数。 "data_mixed23.npy"文件共存储2000组数据,由以下混合外势生成:V_binary[z] = -ε·[(a/(z+a/2))³ + (a/(L+a/2 - z))³] - mg·z 所有文件夹均打包为.zip压缩文件。 文件夹~/R_data_generator存储该数据集的生成代码,以及一维硬杆流体的解析解;文件夹~/Rdata存储以.Rdata格式保存的同类数据,格式为R矩阵(R matrix);文件夹~/R2py包含用于将.Rdata文件转换为.npy文件的脚本。



