Skip to content
  • 咨询一个关于fluent并行计算的问题

    Fluent
    2
    0 赞同
    2 帖子
    3k 浏览
    I

    MPI 安装都一样吗?

  • 0 赞同
    5 帖子
    8k 浏览
    F

    可以设计一个量纲的类,里面包含一个整形数组来记录量纲的分量,如[L, M, T]还要定义量纲的运算。然后设计一个标量的类,里面除了浮点数据之外,再加一个量纲,定义标量的动作时也要注意其中的量纲计算。同理还可以定义向量和张量。比如距离的量纲是[1, 0, 0],速度的量纲是[1, 0, -1]。

  • ICEM大家怎么发音?

    Meshy
    6
    0 赞同
    6 帖子
    13k 浏览
    Q

    啊客母~

  • fluent theory guide翻译

    Fluent
    2
    0 赞同
    2 帖子
    4k 浏览
    I

    @东岳 在 关于correctPhi.H这个函数 中说:

    哦对了还有fluent理论指南。最近琐事太多了:sad: 。都已经翻译完了。就是格式太难统一了。因为是各自翻译的。用的是word。处理格式比较费时。

    这个可能是最近的进展了

  • CFD基础理论

    CFD彩虹条
    5
    0 赞同
    5 帖子
    11k 浏览
    .J..

    我也来贴一个好东西吧:https://github.com/barbagroup/CFDPython
    叫做12 Steps to Navier-Stokes
    语言是python,IDE推荐anaconda
    内嵌视频是youtube的,翻墙自己想办法吧。

  • CFD青年成长支持计划(2021)

    公告
    137
    0 赞同
    137 帖子
    165k 浏览
    F

    想问一下李老师这个计划还有吗!!很想要这本湍流模型:mianmo:

  • 0 赞同
    5 帖子
    8k 浏览
    Z

    @liailei0627 恩恩 谢谢大佬!!

  • OpenFoam stuff forward from The Visual Room

    OpenFOAM
    1
    0 赞同
    1 帖子
    3k 浏览
    N

    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.

  • 0 赞同
    2 帖子
    4k 浏览
    I

    你查一下这方面的实验论文吧?
    壁面速度低,容易造成管壁聚集

  • 引自CFD-Online.com一个大牛的邮件:

    CFD彩虹条
    1
    0 赞同
    1 帖子
    4k 浏览
    李东岳

    此人在2005年左右淡出CFD-online.com,个人和他有一些私交,谈到了这个话题:为什么不活跃与论坛了?我们从您的帖子中学到了很多东西。他如下回答(翻译):

    活跃于论坛是非常耗费时间,许多问题都是重复的,越来越多的人想不劳而获的获取帮助,他们也不愿意为帮助他们的人提供一点好处。CFD不是我的业余爱好,CFD是我的职业,我需要靠CFD谋生。提供免费的服务不可持续。

  • 发帖!!!

    CFD彩虹条
    1
    0 赞同
    1 帖子
    4k 浏览
    胖猫

    天天净整这乱七八糟的

    sad....

  • ICEM里“块”和“模型”是什么关系?

    Meshy
    2
    0 赞同
    2 帖子
    5k 浏览
    Elibathe康E

    块就是将你的整个计算区域分割成几个区域,每个区域有各自的网格分布规律;
    模型应该是你计算的几何外形吧

  • 0 赞同
    2 帖子
    3k 浏览
    I

    编译方式不一样?

  • 有关ANSYS Fluent和PV panels simulation的问题

    Fluent
    2
    0 赞同
    2 帖子
    5k 浏览
    I

    大气温度可以通过udf patch 进去,太阳辐照我推测可以采用边界条件设置,但是Fluent guide里面完全没有提到关于weather file 的东西,请您给些提示吧

  • 0 赞同
    18 帖子
    27k 浏览
    L

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

    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

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

  • 0 赞同
    10 帖子
    14k 浏览
    李东岳

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

  • 回复kscandal

    Meshy
    2
    1 赞同
    2 帖子
    7k 浏览
    Dream_ChaserD

    回复: 两个相切的圆如何进行关联
    @kscandal
    同学,我说的话,你确定,你懂?

  • 0 赞同
    3 帖子
    9k 浏览

    可参考该篇博文:http://liusuanyatong.blog.163.com/blog/static/2155951572016527422386/

  • 如何理解CFD计算中的数值噪声?

    Algorithm
    2
    0 赞同
    2 帖子
    4k 浏览
    bestucanB

    比如
    当用浮点数乘除得到一个整数的时候,很可能是 0.99999999999 1.0000000001。
    这个完全无法预测。写函数解决?可是又不知道它本该是整数还是很接近这个整数。

  • 0 赞同
    2 帖子
    3k 浏览
    I

    RSM 怎么样? 对雷诺数没有的限制