OpenFOAM

4.5k 主题 26.4k 帖子
  • OpenFOAM多组分返回热物性

    12 帖子
    5k 浏览

    @东岳 在 OpenFOAM多组分返回热物性 中说:

    实际就是rho_

    这样!明白了明白了,谢谢。

  • 5 帖子
    2k 浏览

    @东岳 好,谢谢,得啃求解器了,

  • 编译安装Openfoam

    1 帖子
    829 浏览

    给大家分享一个编译安装的例子,在Ubuntu18.04上安装OpenFoam2.3.1
    https://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-2.3.1/Ubuntu#Ubuntu_18.04

  • kEpsilon模型中k和epsilon如何估算

    8 帖子
    6k 浏览

    @cccrrryyy 非常感谢

  • 请问用户指南的这个图是怎么画出来的

    3 帖子
    1k 浏览

    还有 轴缩放

  • twoPhaseEulerFoam下的bubbleColumn算例的问题

    4 帖子
    2k 浏览

    @LiuZhuangtwoPhaseEulerFoam下的bubbleColumn算例的问题 中说:

    在outlet边界上气体自由逸出,液体则为壁面(zeroGradient)

    好长没太细看:zoule: 不过我觉得你可以设置液体壁面速度为slip试试

  • Openform 与 Fluent模拟气液传质

    1 帖子
    884 浏览

    1.jpg
    图片是CES中 作者用openform 模拟的单气泡上升时的 质量传递 过程。 云图为氧气浓度分布云图。
    想问下老师们,这个能用Fluent模拟嘛? Fluent能做出类似的氧气浓度分布云图吗?

  • snappyHexMesh增加边界层失败

    3 帖子
    2k 浏览

    @gogo 请问你现在有在边界层生成功吗?我看了一下你的文件,觉得你的边界层网格设置的不好,finalThickness太小,这样即便生出来长宽比也会很大

  • 动量方程的2/3μ这一项

    9 帖子
    3k 浏览

    @队长别开枪 谢谢指导。
    这么看来,OpenFOAM对可压缩跟不可压缩的问题实现了代码的复用。
    如果是不可压的,收敛后∇⋅U=0,2/3这项自动为0,也就省略了,不知道这么理解对不对。

    那么对于动量方程2.png
    这种形式的动量方程,没有体现2/3μ这一项,是因为不够严谨,还是因为这一项因为∇⋅U=0而省略掉?

    如果是后者的话,那么这就变成不可压缩的动量方程?那为何还有密度这一项?

    还是说这是一个统称的写法,具体还要根据问题判断。谢谢。

  • SRFSimpleFoam里边界条件的设置?

    6 帖子
    3k 浏览

    你好,我最近准备使用SRF求解器,但是应用过程中一直存在问题,请问明白前述的问题了吗?
    或者,有没有关于SRF求解器的资料可以分享一下?谢谢!

  • 2d 模拟 z方向网格尺寸对结果的影响

    1 帖子
    760 浏览

    在做VoF 2d模拟的时候发现z方向网格的厚度对alpha.water的值居然有影响,厚度太小,alpha值会略大于1,不知道大家有相同的经历没。有点想不通啊,方程在z方向应该是不进行求解的啊,厚度怎么会有影响呢。

  • mesh_.C().size()的格式问题?

    3 帖子
    1k 浏览

    @东岳 哦,明白了,谢谢李老师。

  • ViewFactorDict中参数的含义?

    12 帖子
    5k 浏览

    @东岳 2016-Towards-A-Cooler-Singapore.pdf
    我看上传文件最大为400k啊。只能上传这个文档了,这是徐明博士早期的文章。如果有兴趣,可以顺着这个文章找他后来的作品。请东岳查收。

  • 关于正12面体网格和正六面体网格

    7 帖子
    2k 浏览

    @队长别开枪 多谢老师

  • TwoPhaseEulerFoam求解器算例设置

    13 帖子
    6k 浏览

    东岳老师您的邮箱多少?关于twoPhaseEulerFoam的问题我有几点想跟您请教

  • 请教OpenFOAM获得某个区域面积的方法

    2 帖子
    1k 浏览

    我在网上见到的代码,你试试:

    const cellList& cells = mesh.cells(); const vectorField& faceAreas = mesh.faceAreas(); List<bool> outsideFaces(faceAreas.size(), false); forAll(mesh.cellZones(), zoneI) { const labelList& cellLabels = mesh_.cellZones()[zoneI]; outsideFaces = false; // mark all faces that are NOT internal to the cellZone: forAll(cellLabels, i) { const cell& c = cells[cellLabels[i]]; forAll(c, cFaceI) { const label faceI = c[cFaceI]; // xor operation // internal faces get marked twice, outside faces get marked once if (outsideFaces[faceI]) { outsideFaces[faceI] = false; } else { outsideFaces[faceI] = true; } } } // now calculate the area scalar zoneOutsideArea = 0; label zoneOutsideNFaces = 0; forAll(outsideFaces, faceI) { if (outsideFaces[faceI]) { zoneSurfaceArea += mag(faceAreas[faceI]); zoneOutsideNFaces++; } } Info<<"zone:" << zoneI << " nFaces:" << zoneOutsideNFaces << " area:" << zoneOutsideArea << endl; }

    https://www.cfd-online.com/Forums/openfoam-programming-development/69661-how-compute-cellzone-volume.html

  • codeeFixedValue boundary condition的问题

    1 帖子
    643 浏览
    inlet { .. code #{ forAll(patch().Cf(),i) //遍历整个边界 { Aera+=patch().magSf()[i]; } info<<Aera<<nl; //面积输出到界面 }; .. }

    上面是在0/U中,对入口的面积进行计算,利用simpleFoam非定常计算时,time=1, Aera输出了3次,后面的时间Aera都输出了两次,请问这是为什么啊?

  • 11 帖子
    4k 浏览

    @conghongchuan 找到了这个,但是具体的内容我还没研究
    https://blog.csdn.net/hedongya/article/details/78976283

  • 物面边界的面积如何求取?

    1 帖子
    664 浏览

    想对物面边界的面积进行计算,在Openfoam中应该用什么命令?如何实现?

  • 关于2D axisymmetric边界条件的设定

    4 帖子
    2k 浏览

    对称轴可以不设任何边界条件,因为轴上没有网格面。

  • open foam矢量运算符号

    3 帖子
    2k 浏览

    @我是河滩 是这样的,代码看懂了,谢谢指导。

  • 5 帖子
    2k 浏览

    @liailei0627 恩恩 谢谢大佬!!

  • 18 帖子
    7k 浏览

    @东岳 最近根据东岳先生的指导,对这个求解器不那么陌生了,也简单做了一个自己的小例子。目前程序能跑起来。拜谢东岳先生!!!
    这是我做出来的一点东西:

    52da8e03-f286-4265-af05-d6e9fc489eb9-image.png

    这个是两相流的含气率分布。但是我看了一些论文在顶部设置的边界条件叫做液相壁面采用无滑移边界条件。气泡达到顶部以上浮速度自由逸出。不太理解这句话对应的OF边界条件是什么?
    PS:目前顶部采用的边界条件为:U.air

    4b6d193c-82a4-4b02-bcff-35f1c7175f10-image.png

    U.water

    6476ca4f-42b8-4589-9b2b-cd630e777ae0-image.png

    p文件:

    1bb31ddf-45fb-4d4e-a0d3-1e02293e4b32-image.png

    目前还是依据算例进行自己改动,仍然没达到气泡以上浮速度自由逸出的效果,请问东岳先生对此有什么好的建议么?
    叨扰叨扰,再次拜谢!!!

  • 如何由UPrime2Mean获得RMS速度?

    5 帖子
    2k 浏览

    @就是个胖子 嗯,是,可以,只是感觉略微有点麻烦。

  • 6 帖子
    2k 浏览

    @就是个胖子
    一些太基础以至于很难搜到的点:

    #是注释符号, #!/bin/bash 是指定运行改脚本的shell, $1 是脚本运行的第一个参数,同理$2 $3是第二第三个参数。

    下面这个脚本功能是,编译某个文件夹下,所有以.tex结尾的文件。
    脚本文件的名称叫 latexall.sh。 执行的时候输入命令"latexall ./"
    这时候对于脚本来说$1就变成了“./”即,当前文件夹。
    循环.png
    这是个根据前后缀特征提取字幕文件里的字幕信息的脚本。这些乱七八糟的符号叫“正则表达式”。
    处理字幕.png

  • 1 帖子
    716 浏览

    以DTChull算例为例,该船6m长,速度是1.668 m/s 自己根据网上的找的公式算出来的k和omega和算例中给定的差别很大,自己用的公式是6ac30593-c076-46d9-8b9b-af132f89a9f5-图片.png
    3d1cc183-2b26-40b4-9c6c-e71332a0b616-图片.png

  • 使用sixDoFRigidBodyState这个functionObject报错

    5 帖子
    2k 浏览

    @东岳 李老师太客气啦!:shangxue:

  • paraview中出流流量的转换

    1 帖子
    788 浏览

    请问大侠,一个对称圆柱的二维计算,怎样计算其出口质量流量,还是说二维计算没有质量流量一说,在preview中计算质量流量,或者怎样转化为三维情况下的结果?

  • DPMFoam one-way coupling

    7 帖子
    2k 浏览

    @东岳 如果是像fluent中DPM里颗粒都是mass point的话就不存在这个问题了。

  • 圆管对流换热,入口段温度分布异常

    3 帖子
    2k 浏览

    externalWallHeatFluxTemperature,将q设为0.

    不过我用这个BC加恒定热流密度,后处理用wallheatflux计算,发现有个min/max区间,integral的值比应该注入的能量少0.3W(48.8W VS 48.5W),不知道这是否正常。

  • 10 帖子
    3k 浏览

    感谢大家分享!:xiexie: 论坛急需散金币机制。暂且欠每人1000金币!:w:

  • 边界条件设置求教

    3 帖子
    1k 浏览

    @东岳 好的我试试,谢李老师

  • OpenFoam stuff forward from The Visual Room

    1 帖子
    735 浏览

    This is the OpenFOAM language.
    http://www.thevisualroom.com/24_openfoam_language/openfoam_language.html

    What are features of C++?
    What is explicit evaluation?
    What is implicit evaluation?
    What are the higher level data types?
    What are fields?
    What are the three types?
    What are the five basic classes?
    What are the three space-time classes?
    What are the three field algebra classes?
    What are the two discretisation classes?
    What is a geometricField<Type>?
    What is the objectRegistry?
    What is the IOobject?
    How is a dictionary object read?
    How is volVectorField read from disk?
    How is volScalarField constructed?
    What are the read and write options?
    How are objects represented in OpenFOAM?
    How is matrix inversion done in fvm?
    What are lists?
    What are fields?
    How is memory accessed?
    How is IO Communication done?
    How are derivatives of fields evaluated?
    What are the functions for discretisation?
    How can are equations translated into code?
    How is the PISO algorithm programmed?
    What are header files?
    What is wmake?
    1.1.1. What are features of C++?
    Feature Meaning
    typedefs Alias for a possibly complex type name
    function Group of statements that perform a task
    pointers Data type that holds addresses to refer to values in memory (e.g. for dynamic memory allocation)
    data structures Data members grouped under one name (e.g. the nodes in a linked list)
    classes Data members and function members grouped under one name
    constructor Function member that initialises the instance of it’s class
    destructor Function member that destroys the instance of it’s class
    friends Allows a function or class access to private or protected members of a class
    inheritance Allows a class to be created based on another class (so code can be reused)
    virtual member functions Member function that will be redefined in a derived class
    abstract class Class that contains at least one virtual function
    template Family of classes (class template), functions (function template), variables (variable template) or alias of a family of types (alias template)
    namespace Prevents name conflicts in large projects
    1.1.2. What is explicit evaluation?
    Evaluate spatial derivatives at the current timestep
    Uses known values
    1.1.3. What is implicit evaluation?
    Evaluate spatial derivatives at future timestep
    Uses unknown values - generates a matrix equation to be solved
    1.1.4. What are the higher level data types?
    Type Meaning
    volScalarField
    scalar, e.g. pressure
    volVectorField
    vector, e.g. velocity
    volTensorField
    tensor, e.g. Reynolds Stress
    surfaceScalarField
    surface scalar, e.g. flux
    dimensionedScalar
    constant, e.g. viscosity
    1.1.5. What are fields?
    Arrays of data stored at cell centres in the mesh

    Include bouundary information

    Three types
    volScalarField
    volVectorField
    volTensorField
    Values are stored in named dictionary files in named timestep directories e.g. case/0/p for pressure

    1.1.6. What are the three types?
    <Type> refers to:

    scalar
    vector
    tensor
    1.1.7. What are the five basic classes?
    Class Meaning
    fvPatchField
    (and derived classes)

    Boundary conditions
    lduMatrix
    fvMatrix
    (and linear solvers)

    Sparse matrices
    1.1.8. What are the three space-time classes?
    Class Meaning
    polyMesh
    Stands for polyhedral mesh

    Most basic mesh class

    Contains:
    pointField
    faceList
    cellList
    polyPatchList
    fvMesh
    Extends polyMesh contains:
    Cell volumes (volScalarField)
    Cell centres (volVectorField)
    Face area vectors (surfaceVectorField)
    Face centres (surfaceVectorField)
    Face area magnitudes (surfaceScalarField)
    Face motion centres (surfaceScalarField)
    Time
    Class to control time during OpenFOAM
    Declared as variable runTime
    Provides list of saved times runTime.times()
    Timestep = deltaT()
    Return current directory name = name()
    Time increments = operator++() operator+=(scalar)
    Write objects to disk = write()
    Start time, end time = startTime(), endTime()
    1.1.9. What are the three field algebra classes?
    Class Meaning
    Field<Type>
    Array template class, e.g. Field<vector> = vectorField

    Renamed using typedef as:
    scalarField
    vectorField
    tensorField
    symmTensorField
    tensorThirdField
    symmTensorThirdField
    dimensionedField

    geometricField<Type>
    Combination of:
    Field
    GeometricBoundaryField
    fvMesh
    dimensionSet
    Defines values at all locations in domain with aliases:
    volField<Type>
    surfaceField<Type>
    pointField<Type>
    1.1.10. What are the two discretisation classes?
    Class Meaning
    fvc
    Stands for finite volume calculus
    Explicit derivative evaluation
    Input = known geometricField<Type>
    Output = geometricField<Type> object
    fvm
    Stands for finite volume method
    Implicit derivative evaluation
    Input = unknown geometricField<Type>
    Output = fvMatrix<Type> object, which can be inverted in the matrix equation Mx=y
    1.1.11. What is a geometricField<Type>?
    volField<Type>
    surfaceField<Type>
    pointField<Type>
    1.1.12. What is the objectRegistry?
    Object registry of entities (dictionaries, fields) which are to be read in or written out

    1.1.13. What is the IOobject?
    Defines I/O attributes of entities managed by the object registry.

    1.1.14. How is a dictionary object read?
    Code Meaning
    Info << "Reading transportProperties" << endl;
    Send message to screen
    IOdictionary transportProperties
    (
    IOobject
    (
    "transportProperties",
    runTime.constant(),
    mesh,
    IOobject::MUST_READ
    IOobject::NO_WRITE
    )
    );
    Read in at creation
    dimensionedScalar nu
    (
    transportProperties.lookup("nu")
    );
    Lookup viscosity in dictionary
    1.1.15. How is volVectorField read from disk?
    Code Meaning
    volVectorField U
    (
    IOobject
    (
    "U",
    Times[i].name(),
    runTime,
    IOobject::MUST_READ
    ),
    mesh
    )
    volVectorField read in from disk
    Associated with runTime database
    Must be read
    1.1.16. How is volScalarField constructed?
    Code Meaning
    volVectorField magU
    (
    IOobject
    (
    "magU",
    Times[i].name(),
    runTime,
    IOobject::NO_READ
    IOobject::AUTO_WRITE
    ),
    ::mag(U)
    );
    magU.write();
    construct mag(U) object of type volScalarField called magU
    write it out
    1.1.17. What are the read and write options?
    Class Meaning
    NO_READ
    Object created
    MUST_READ
    READ_IF_PRESENT
    Object asked to read
    NO_WRITE
    Object destroyed
    AUTO_WRITE
    Object asked to write
    1.1.18. How are objects represented in OpenFOAM?
    How to create an object that writes the magnitude of a velocity vector?

    Class Meaning
    #include "fvCFD.H"
    int main(int argc, char argv[])
    {

    include "addTimeOptions.H" include "setRootCase.H" include "createTime.H"

    instantList Times = runTime.times();

    include "createMesh.H"

    One block called main is needed
    #include to store commonly used code
    runTime is a variable of the OpenFOAM Time class - for timestepping through code
    for(label i=0; i<runTime.size(); i++)
    {
    runTime.setTime(Times[i],i);
    Info << "Time: " << runTime.value() << endl
    volVectorField U
    (
    IOobject
    (
    "U",
    Times[i].name(),
    runTime,
    IOobject::MUST READ
    ),
    mesh
    );
    Loop over all possible times
    Read in a volVectorField U
    volScalarField magU
    (
    IOobject
    (
    "magU",
    Times[i].name(),
    runTime,
    IOobject::NO READ,
    IOobject::AUTO WRITE
    ),
    ::mag(U)
    );
    magU.write();
    } return 0;}
    Construct a volScalarField magU
    Write out the velocity
    1.1.19. How is matrix inversion done in fvm?
    Each operator in fvm constructs particular entries in known M and y as a fvMatrix object
    fvMatrix is a template class (actual classes are fvScalarMatrix etc)
    fvMatrix handles storage via lduMatrix class
    fvMatrix class also handles solution
    1.1.20. What are lists?
    Class Meaning
    List<Type>
    Array template class
    Allows creation of a list of any object of a class e.g. List<vector>
    PtrList<Type>
    List of pointers
    SLList<Type>
    Non-intrusive singly-linked list
    1.1.21. What are fields?
    Class Meaning
    Field<Type>
    Array template class, e.g. Field<vector> = vectorField

    Renamed as scalarField, vectorField, tensorField, symmTensorField,
    tensorThirdField and symmTensorThirdField

    1.1.22. How is memory accessed?
    Arrays
    Pointers
    References
    1.1.23. How is IO Communication done?
    Code Meaning
    Info << "Time = " << runTime.timeName() << nl << endl;
    Info object is output to the screen
    1.1.24. How are derivatives of fields evaluated?
    Time derivative

    Divergence (div)
    Spatial derivative
    Discretised using the flux at the faces
    e.g. ∇⋅(uq) (the advection term)
    Gradient (grad)
    Spatial derivative
    e.g. ∇p in the momentum equation
    Laplacian
    Spatial derivative

    Discretised as ∇⋅μ∇q
    gradient scheme for ∇q
    interpolation for μ
    discretisation for ∇⋅
    e.g. μ∇2q in the momentum equation

    1.1.25. What are the functions for discretisation?
    Function Meaning
    fvc::ddt(A)
    fvm::ddt(A)
    Time derivative
    ∂A/∂t
    A can be a scalar, vector or tensor
    fvc::ddt(rho,A)
    fvm::ddt(rho,A)
    Density weighted time derivative
    ∂ρA/∂t
    ρ can be any scalar field
    fvc::d2dt2(rho,A)
    fvm::d2dt2(rho,A)
    Second density weighted time derivative
    ∂/∂t(ρ∂A/∂t)
    fvc::grad(A)
    fvm::grad(A)
    Gradient
    A can be a scalar or a vector
    Result is a volVectorField (from scalar) or a volTensorField (from vector)
    fvc::div(A)
    fvm::div(A)
    Divergence
    A can be a vector or a tensor
    Result is a volScalarField (from vector) or a volVectorField (from tensor)
    fvc::laplacian(A)
    fvm::laplacian(A)
    Laplacian
    ∇2A
    fvc::laplacian(mu, A)
    fvm::laplacian(mu, A)
    Laplacian
    ∇⋅(μ∇A)
    fvc::curl(A)
    fvm::curl(A)
    Curl
    ∇×A
    fvm::div(phi,A)
    Divergence using flux to evaluate this
    A can be a scalar, vector or a tensor
    fvm::Sp(rho,A)
    Implicit evaulation of source term
    fvm::SuSp(rho,A)
    Implicit or explicit evaulation of source term (depending on sign of rho
    1.1.26. How can are equations translated into code?
    Equation Code
    ∂q∂t+∇⋅qu=μ∇2q
    fvScalarMatrix transport
    (
    fvm::ddt(q)
    + fvm::div(phi,q)
    - fvm::laplacian(mu,q)
    );

    // phi is the flux from the momentum equation
    ∂T∂t=κ∇2T
    solve(fvm::ddt(T) == kappa*fvc::laplacian(T))

    // T is a volScalarField defined on the mesh
    // A discretised representation of the field variable T
    // solve performs matrix inversion for one step
    ∂k∂t+∇⋅ku−∇⋅[(ν+νt)∇k]=νt[1/2(∇u+∇uT]2−ε/k
    solve(
    fvm::ddt(k)
    + fvm::div(phi,k)
    - fvm::laplacian(nu()+nut,k)
    == nut*magSqr(symm(fvc::grad(U)))
    - fvm::Sp(epsilon/k,k)
    );
    1.1.27. How is the PISO algorithm programmed?
    The PISO (Pressure Implicit with Splitting of Operators) is an efficient method to solve the Navier-Stokes equations

    The algorithm can be summed up as follows:

    Set the boundary conditions.
    Solve the discretized momentum equation to compute an intermediate velocity field.
    Compute the mass fluxes at the cells faces.
    Solve the pressure equation.
    Correct the mass fluxes at the cell faces.
    Correct the velocities on the basis of the new pressure field.
    Update the boundary conditions.
    Repeat from 3 for the prescribed number of times.
    Increase the time step and repeat from 1.
    The implementation:

    Define the equation for U
    fvVectorMatrix UEqn
    (
    fvm::ddt(U)

    fvm::div(phi, U) fvm::laplacian(nu, U)
    );
    Solve the momentum predictor
    solve (UEqn == -fvc::grad(p));
    Calculate the ap coefficient and calculate U
    volScalarField rUA = 1.0/UEqn().A();
    U = rUA*UEqn().H();
    Calculate the flux
    phi = (fvc::interpolate(U) & mesh.Sf()) fvc::ddtPhiCorr(rUA, U, phi);
    adjustPhi(phi, U, p);
    Define and solve the pressure equation and repeat for the prescribed number of non-orthogonal corrector steps
    fvScalarMatrix pEqn
    (
    fvm::laplacian(rUA, p) == fvc::div(phi)
    );
    pEqn.setReference(pRefCell, pRefValue);
    pEqn.solve();
    Correct the flux
    if (nonOrth == nNonOrthCorr)
    {
    phi -= pEqn.flux();
    }
    Calculate continuity errors include "continuityErrs.H"

    Perform the momentum corrector step
    U -= rUA*fvc::grad(p);
    U.correctBoundaryConditions();
    The following is from the OpenFOAM UK Users Group:

    1.1.28. What are header files?
    Sections of code in separate files that are widely used - all function prototypes in a header file

    Equation Code
    #include "CourantNumber.H"
    File containing code for calculating Courant number
    1.1.29. What is wmake?
    wmake is a make system – directs the compiler to compile specific files in particular ways.

    Controlled through files in Make:
    files – specifies which user-written files to compile and what to call the result
    options – specifies additional header files/libraries to be included in the compilation.

  • OpenFOAM删除全部时间步下的某个文件

    1 帖子
    767 浏览

    有些场数据完全不需要,比如ddt场,可以通过

    find . -name "ddt*" -type f

    确认删除的场,然后

    find . -name "ddt*" -type f -delete

    删除

    参考 https://askubuntu.com/questions/377438/how-can-i-recursively-delete-all-files-of-a-specific-extension-in-the-current-di

  • 1 帖子
    760 浏览

    按照文献中的案例模拟了一个三维方腔流
    我的垂直速度曲线图和水平速度曲线图
    BOT8L352FD5IWM~S5IFVX42.png MS0N{_5W.png
    和实验结果不一样
    QQ图片20190306104704.png
    是什么原因造成的?

  • 2 帖子
    1k 浏览

    OpenFOAM手册第六章讲后处理。所有的数据都在文本里存着,所以这个后处理更像是取样(sample)。
    用命令把速度数据提成单个文件,用其他后处理软件读取画图。
    或者把扩展名改成cvs就可以用excel打开。在excel或者matlab里画。

    如果OpenFOAM自带的命令满足不了你的需求。就搜linux上的文本处理软件,根据数据的特征(位置特征、前后缀特征)提取。

  • fvsPatchField与fvPatchField的区别

    2 帖子
    1k 浏览

    个人感觉fvPatchField是记录定义在网格体中心(cell center)的变量比如U在计算域边界上的值。fvsPatchField是记录定义在网格面中心(face center of cell)的变量比如phi,在计算域边界上的值。

  • OpenFOAM模拟管道流

    7 帖子
    5k 浏览

    @东岳 这个模型我很需要,请问东岳先生是用OF哪个版本的哪个求解器实现的?能否引入侧吹(也就是气泡从侧方吹入,而不是底部吹入)?

  • new cannot satisfy memory request

    1 帖子
    1k 浏览
    new cannot satisfy memory request. This does not necessarily mean you have run out of virtual memory. It could be due to a stack violation caused by e.g. bad use of pointers or an out of date shared library

    如果你遇到这个问题,一种解决方式是把你的求解器重新编译一下,可能是bad use of out of date shared library。原因是你的库重新写了一些代码并重新编译了,但求解器没跟进

  • OpenFOAM中的LISA模型中粒径分布怎么设置

    1 帖子
    900 浏览

    请教各位老师和同学一个问题:我在使用sprayFoam求解器的时候,想把液滴初次雾化模型 atomizationModel设置为LISA模型,请问该模型得到的液滴直径分布是否会和injectionModel中设置的初始粒径相互冲突吗,foam中是怎么处理的?

  • 自定义求解器如何添加动网格功能?

    1 帖子
    814 浏览

    如题...

  • OpenFOAM sparse matrix 内存管理

    2 帖子
    1k 浏览

    好吧!我先自己回复下自己。在稀疏矩阵存储中,通用有两种格式,如下矩阵

    A = [ a00 a01 0 0 0 a11 a12 0 a20 0 a22 0 a30 0 0 a33];

    引用一篇博士论文 CRS scheme stores the non-zero elements the matrix in left-to-right and top-to-bottom order in vector v (row-wise storge). 存储格式如下

    v = [a00, a01, a11,a12,a20,a22,a30,a33] cI = [0,1,1,2,0,2,0,3] rI = [0,1,1,2,0,2,0,3]

    但是在openfoam中,不是这么存储的
    openfoam是一种 LDU 格式 对角线 lowerAddr() upperAddr()

    A = [ d0 u0 u1 0 0 0 l0 d1 u2 0 0 0 0 l1 l2 d2 u4 u5 . . . ] l = [l0 l1 l2 ...] d = [d0 d1 d2 d3 d4 ...] u = [u0 u1 u2 u3 ...] L = [0 0 1 1 2 2 3 ...] U = [1 2 2 3 3 4 4 ..]

    具体可参见lduAddressing.H 头文件
    因为计算流体力学中,大部分矩阵都是对称(因为一个internal face对应两个体)除了特别的边界条件外,基本上都是对称矩阵。而矩阵对角元素就更好求了,大部分情况直接把该行相加就得到主对角元素。这种sparse matrix设计是符合cfd计算原理的,但是我的问题还是没解决。看到相关资料分享一下。
    稀疏矩阵也分好多种,openfoam中的renumberMesh就是尽量保证在是多对角阵。
    谢谢!

  • 5 帖子
    2k 浏览

    @东岳 好的,了解了!!谢谢您

  • 耦合面的边界条件

    1 帖子
    886 浏览

    在多区域(液体和固体换热)计算中,某一个物理量(温度T)在两个区域间的interface是一个连续的量,即没有热阻,这个interface边界条件该怎么设置?
    在OpenFOAM自带的多区域算例中,这种耦合面用的边界条件是turbulentTemperatureCoupledBaffleMixed,这个其实是根据边界面的值是根据边界上的值来计算传热系数的,里面写的很麻烦,有点看不懂。有没有哪位老师指点一下?多谢多谢~

  • wall边界第一层网格拆分成10个网格

    1 帖子
    785 浏览

    如题,OpenFOAM中有简单的命令可以快速实现吗?试过refineWallLayer,只能添加一层网格。

  • OpenFOAM如何输出场的最小值这个文件?

    8 帖子
    3k 浏览

    @东岳 第一次发帖求助,就能得到东岳老师的回复,真的非常感谢!
    (1)是根据laplacianFOAM稍微改了下的求解器,但是如果是探针probe的话是可以运算出结果的。那cellSource不运行function的话,我需要怎么改下求解器吗
    (2)还想请教下,算例边界条件设置的问题,左图是压力,右图是温度。
    左图压力上下边界条件均为zero flux,右侧问题上下右边界条件为zero conductive flux。对于zero flux和zero conductive flux,边界条件是不是应设置为symmetryPlane,还是zeroGradient。我计算出的结果差别很大,不知道问题出在哪里,所以想确定下是不是我边界条件设置的不对。
    case.JPG

  • 14 帖子
    5k 浏览

    @悬铃神木 谢谢。

  • 请问大家这个错误是怎么回事

    2 帖子
    1k 浏览

    @气固两相流 fluidisedBed.zip
    是一个TFM算例的设置,烦请大神们帮忙看看算例有什么问题,不胜感激

  • 请问大家OpenFOAM有没有这种类型的边界条件

    5 帖子
    3k 浏览

    @random_ran 1243.jpg cyclic边界得到的压力梯度恒为零,跟我所需要的连续的周期性边界条件不太一样

  • 请教:buoyantBoussinesqPimpleFoam边界条件设置

    6 帖子
    3k 浏览

    @东岳 帖子好像沉掉了,再次求助李老师。主要就是顶部边界条件不知道怎么设置,顶部是定压,也就是P是恒定的,但是流体可以自由出入。而方程中求解的是prgh,所以不知道prgh如何设置边界条件了,可能还需要与出口的速度边界条件保持一致性