[{"data":1,"prerenderedAt":244},["ShallowReactive",2],{"content-query-TjoiWzhSbR":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"date":10,"cover":11,"type":12,"category":13,"body":14,"_type":238,"_id":239,"_source":240,"_file":241,"_stem":242,"_extension":243},"/technology-blogs/zh/3394","zh",false,"","基于多级生成对抗网络的流体脉动速度场Cascade-Net预测方法在MindSpore Flow开源","作者：于璠 来源：知乎","2024-09-06","https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2024/12/13/74ff0e9eed9c4653ae7317c7a893e51d.png","technology-blogs","大V博文",{"type":15,"children":16,"toc":233},"root",[17,25,44,52,57,62,70,78,83,91,96,101,108,113,118,125,130,135,140,148,156,161,168,173,178,186,194,199,208,221],{"type":18,"tag":19,"props":20,"children":22},"element","h1",{"id":21},"基于多级生成对抗网络的流体脉动速度场cascade-net预测方法在mindspore-flow开源",[23],{"type":24,"value":8},"text",{"type":18,"tag":26,"props":27,"children":28},"p",{},[29,31,37,39],{"type":24,"value":30},"**作者：**",{"type":18,"tag":32,"props":33,"children":34},"strong",{},[35],{"type":24,"value":36},"于璠",{"type":24,"value":38}," ",{"type":18,"tag":32,"props":40,"children":41},{},[42],{"type":24,"value":43},"来源：知乎",{"type":18,"tag":26,"props":45,"children":46},{},[47],{"type":18,"tag":32,"props":48,"children":49},{},[50],{"type":24,"value":51},"背景",{"type":18,"tag":26,"props":53,"children":54},{},[55],{"type":24,"value":56},"在湍流时空演化过程中，脉动速度场包含了一系列重要的流体物理过程，如分离、转捩和能量传递。在高雷诺数下，脉动速度场表现出明显的非线性特征。湍流尾迹中存在着从最大尺度到最小尺度的涡结构，这些流体运动模式构成了复杂的流场结构特征。在这些流场结构中，能量从大尺度结构向小尺度结构转移的过程被称为能量级串(energy cascade)物理原理。受到这一原理的启发，可以将多尺度预测问题转化为由大尺度向小尺度逐级预测问题。",{"type":18,"tag":26,"props":58,"children":59},{},[60],{"type":24,"value":61},"哈尔滨工业大学李惠院士团队的圆柱尾流脉动速度场Cascade-Net预测方法巧妙借鉴湍流物理上的能量级串物理机制，以表面压强、Re和少量尾迹速度测点作为输入，设计了具有尺度传递拓扑结构的生成对抗网络Cascade-Net[1]。该方法在亚临界、临界和超临界圆柱绕流为例验证了方法精度，目前已在MindSpore Flow开源[2]。",{"type":18,"tag":26,"props":63,"children":64},{},[65],{"type":18,"tag":32,"props":66,"children":67},{},[68],{"type":24,"value":69},"01",{"type":18,"tag":26,"props":71,"children":72},{},[73],{"type":18,"tag":32,"props":74,"children":75},{},[76],{"type":24,"value":77},"模型介绍",{"type":18,"tag":26,"props":79,"children":80},{},[81],{"type":24,"value":82},"Cascade-Net模型框架如图1所示。Cascade-Net模型以表面压强、Re和少量尾迹速度测点作为输入，考虑到流动发展的历史效应，图中输入特征p为特征周期内脉动压力的时空特征矩阵，特征周期保证涵盖至少一个脉动压力周期。该模型由多个子生成对抗网络（sub-GAN）串联而成，其中每一个sub-GAN用于预测特定尺度下的脉动速度场。",{"type":18,"tag":26,"props":84,"children":85},{},[86],{"type":18,"tag":87,"props":88,"children":90},"img",{"alt":7,"src":89},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2024/09/13/24e754eb8e614d85b1a4ce833a0607cc.png",[],{"type":18,"tag":26,"props":92,"children":93},{},[94],{"type":24,"value":95},"图1 Cascade-Net网络架构",{"type":18,"tag":26,"props":97,"children":98},{},[99],{"type":24,"value":100},"其中，多尺度生成网络G由多个子生成网络复合而成，每个子生成网络为具有空间注意力门和通道注意力门的具有U型结构的编码器-解码器网络（U-Net），子生成网络框架如图2所示。",{"type":18,"tag":26,"props":102,"children":103},{},[104],{"type":18,"tag":87,"props":105,"children":107},{"alt":7,"src":106},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2024/09/13/ede71594f3a345adad41c29c8ef1478b.png",[],{"type":18,"tag":26,"props":109,"children":110},{},[111],{"type":24,"value":112},"图2 注意力机制的子生成网络U-Net架构",{"type":18,"tag":26,"props":114,"children":115},{},[116],{"type":24,"value":117},"该网络中编码器通过一系列卷积和池化层负责对特征进行提取，解码器通过反卷积层将特征解码为速度场。网络通过跳跃链接，在解码器阶段重新注入编码器阶段提取的信息，保留了更多高分辨率细节特征。子生成网络设计了空间注意力门S和通道注意力门C，分别作用于跳跃连接及跳跃连接器特征并入后。空间注意力门S和通道注意力门C示意图如图3所示。同时子生成网络设计了融合网络（Merge Block），对输入的雷诺数及速度场采样信息进行编码并融入编码器所提取的特征中，成为解码器的输入特征。雷诺数及速度场采样信息具有全局性，不适合作为U-net编码器的输入，通过融合网络可以将这些特征作为网络的条件标签，有助于网络在训练过程中学习正确的映射关系，提升网络预测能力。",{"type":18,"tag":26,"props":119,"children":120},{},[121],{"type":18,"tag":87,"props":122,"children":124},{"alt":7,"src":123},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2024/09/13/93fca06a0ba44744a1e64ddbb45a5861.png",[],{"type":18,"tag":26,"props":126,"children":127},{},[128],{"type":24,"value":129},"图3 空间注意力门S与通道注意力门C示意图",{"type":18,"tag":26,"props":131,"children":132},{},[133],{"type":24,"value":134},"Cascade-Net的多尺度判别网络D由对应的不同解析尺度的子判别网络复合而成，而同一解析尺度的子判别网络亦由不同子判别网络复合而成。这里借鉴了PatchGAN，Cascade-Net的判别器输出为卷积层输出的特征图，使得训练模型更好的学习数据中的细节信息。",{"type":18,"tag":26,"props":136,"children":137},{},[138],{"type":24,"value":139},"在损失函数上，Cascade-Net的判别网络采用了Earth-Mover距离和梯度惩罚约束，Cascade-Net的生成网络采用了退化的Earth-Mover距离、Manhattan距离和梯度平方欧氏距离。",{"type":18,"tag":26,"props":141,"children":142},{},[143],{"type":18,"tag":32,"props":144,"children":145},{},[146],{"type":24,"value":147},"02",{"type":18,"tag":26,"props":149,"children":150},{},[151],{"type":18,"tag":32,"props":152,"children":153},{},[154],{"type":24,"value":155},"模型表现",{"type":18,"tag":26,"props":157,"children":158},{},[159],{"type":24,"value":160},"目前，Cascade-Net已经在MindSpore Flow开源。同时，Cascade-Net在亚临界、临界和超临界圆柱绕流脉动速度场预测问题上的应用案例也已经同步开放。网络生成测试集速度U各尺度速度场的预测值与真实值如下图所示，其中一行为一个样本，每张图两列一组共四组，由左向右尺度依次减小，每组左侧为网络预测值，右侧为真值。",{"type":18,"tag":26,"props":162,"children":163},{},[164],{"type":18,"tag":87,"props":165,"children":167},{"alt":7,"src":166},"https://obs-mindspore-file.obs.cn-north-4.myhuaweicloud.com/file/2024/09/13/f974771f7dc24542b5f6e13aa80d1f5d.png",[],{"type":18,"tag":26,"props":169,"children":170},{},[171],{"type":24,"value":172},"图4 网络预测的流向速度U与真实值的对比",{"type":18,"tag":26,"props":174,"children":175},{},[176],{"type":24,"value":177},"可以观察到，Cascade-Net通过串联的多层子网络，从大尺度特征开始，逐级学习细节信息，随着scale逐级增大，流场中蕴含的细节信息逐级增加。可以发现各层子网络对该层网络特定尺度的流场都得到了较好的预测精度，使得网络学习到了更多流场细节信息。结果表明，Cascade-Net对不同流动模式雷诺数脉动速度场和脉动速度场具有良好的预测能力。",{"type":18,"tag":26,"props":179,"children":180},{},[181],{"type":18,"tag":32,"props":182,"children":183},{},[184],{"type":24,"value":185},"03",{"type":18,"tag":26,"props":187,"children":188},{},[189],{"type":18,"tag":32,"props":190,"children":191},{},[192],{"type":24,"value":193},"结论",{"type":18,"tag":26,"props":195,"children":196},{},[197],{"type":24,"value":198},"Cascade-Net将湍流物理上的能量级串物理机制融入网络，巧妙的设计了串联的多层子网络，脉动速度场通过解析尺度由大到小的方式逐级传递预测，通过各层子网络分别预测各级特定尺度上的脉动速度场，并在亚临界、临界和超临界圆柱绕流实验数据案例验证中获得了较高的精度。Cascade-Net和相关应用案例已在MindSpore Flow开源，欢迎开发者们使用。",{"type":18,"tag":200,"props":201,"children":203},"h2",{"id":202},"参考文献",[204],{"type":18,"tag":32,"props":205,"children":206},{},[207],{"type":24,"value":202},{"type":18,"tag":26,"props":209,"children":210},{},[211,213],{"type":24,"value":212},"[1] Mi J, Jin X, Li H. Cascade-Net for predicting cylinder wake at Reynolds numbers ranging from subcritical to supercritical regime[J]. Physics of Fluids, 2023, 35: 075132. ",{"type":18,"tag":214,"props":215,"children":219},"a",{"href":216,"rel":217},"https://doi.org/10.1063/5.0155649",[218],"nofollow",[220],{"type":24,"value":216},{"type":18,"tag":26,"props":222,"children":223},{},[224,226],{"type":24,"value":225},"[2] Cascade-Net: ",{"type":18,"tag":214,"props":227,"children":230},{"href":228,"rel":229},"https://gitee.com/mindspore/mindscience/tree/master/MindFlow/applications/research/cascade%5C_net",[218],[231],{"type":24,"value":232},"https://gitee.com/mindspore/mindscience/tree/master/MindFlow/applications/research/cascade\\_net",{"title":7,"searchDepth":234,"depth":234,"links":235},4,[236],{"id":202,"depth":237,"text":202},2,"markdown","content:technology-blogs:zh:3394.md","content","technology-blogs/zh/3394.md","technology-blogs/zh/3394","md",1776506129407]