Giter Club home page Giter Club logo

driftscalardyfoam's Introduction

driftScalarDyFoam: 基于OpenFOAM的风致雪漂求解器

介绍

本求解器使用标量输运方程模拟雪相在湍流大气层中的输运[1][2][3]

并基于侵蚀/沉积方程调整积雪表面网格

版本适配

本项目的主分支面向OpenFOAM的ESI分支开发(https://www.openfoam.com),基金会分支尚在开发中。

目前已验证的版本适配包括:

driftScalarDyFoam-master - OpenFOAM-v2012, OpenFOAM-v2106

下载与安装

cd $WM_PROJECT_DIR  #进入OpenFOAM根目录
mkdir extend        #建立一个任意名称的空文件夹
cd extend

git clone https://github.com/fightingxiaoxiao/driftScalarDyFoam.git

cd driftScalarDyFoam
wmake #编译项目

参考算例

平屋面积雪

建筑周边积雪

快速开始

driftScalarDyFoam参考scalarTransportFoam、simpleFoam及moveDynamicMesh开发。其算例框架与标准的OpenFOAM算例是一致的。需要额外补充的内容包括:

erosionDepositionProperties

该字典应当放置在constant文件夹下,需要声明的参数包括:

ca              7e-4;   // 即A_ero,控制侵蚀方程的常数
rhoSnow         150;    // 雪的堆积密度         
rhoAir          1;      // 空气密度,在不可压求解器中恒为1
Uthreshold      0.2;    // 阈值剪切风速

UResidual       (2e-4 5e-4 5e-4);   // 子循环中的速度残差阈值
pResidual       5e-4;               // 子循环中的压力残差阈值
TResidual       5e-6;               // 子循环中的浓度残差阈值
nSubCycles      1000;               // 每个计算阶段内的最大子循环数

雪漂浓度边界

积雪表面的浓度根据当前的侵蚀量给出一个Neumann边界条件[1]

在数值计算中,该Neumann边界条件被离散为如下形式:

由于原生的OpenFOAM没有类似的边界条件,因此现有的方案是采用codedFixedValue边界条件在计算时进行动态编译,相关的内容可见算例中的0.orig/Tsystem/codeDicterosionFlux代码段。

此外,为了确保边界上的质量交换率能被正确更新,雪面的边界名称应当附加".snow"后缀,如"roof.snow"。

动网格

根据每个面网格的雪质量交换率,driftScalarDyFoam创建了一个名为deltaH的面标量场来监控雪面的高度变化。在0.orig/pointMotionUsystem/codeDict中,我们利用OpenFOAM原有的场映射组件,将面标量场映射为节点向量场,并同样采用codedFixedValue边界指定每个时间步(或称阶段)中的边界节点位移速度。因此,使用者应当结合自己的模型特征对0.orig/pointMotionUsystem/codeDict中的erosionDeposition代码段进行改动。

相关论文

如您对我们的项目感兴趣,可以在GitHub中点击Star以进行支持和持续关注。

如您在研究中使用或借鉴了该项目,请引用:

[1] Chen X and Yu Z (2022) DriftScalarDyFoam: An OpenFOAM-Based Multistage Solver for Drifting Snow and Its Distribution Around Buildings. Front. Earth Sci. 10:822140. doi: 10.3389/feart.2022.822140

鸣谢

本项目受到以下项目的资助:

  1. 大跨度钢结构屋盖的风雪流作用及响应(国家自然科学基金(面上项目),51378428)

  2. 建筑风雪流相界自适应模型与分阶段准动态耦合分析理论(国家自然科学基金(面上项目),52178506)

参考文献

[1] Tominaga Y, Okaze T, Mochida A. CFD modeling of snowdrift around a building: An overview of models and evaluation of a new approach[J]. Building and Environment, 2011, 46(4): 899-910.
[2] Zhou X, Kang L, Gu M, et al. Numerical simulation and wind tunnel test for redistribution of snow on a flat roof[J]. Journal of Wind Engineering and Industrial Aerodynamics, 2016, 153: 92-105.
[3] Zhu F, Yu Z, Zhao L, et al. Adaptive-mesh method using RBF interpolation: A time-marching analysis of steady snow drifting on stepped flat roofs[J]. Journal of Wind Engineering and Industrial Aerodynamics, 2017, 171: 1-11.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.