Skip to content
  • 管道内的圆柱绕流

    Algorithm
    4
    0 赞同
    4 帖子
    6k 浏览
    李东岳

    @zhaodl 这个目前我尚不清楚

  • cavity算例

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

    @李东岳 已经解决,多谢李老师

  • 请教关于fluent质量传递问题

    Fluent
    1
    0 赞同
    1 帖子
    2k 浏览
    S

    用的是2022r1,在设置好了组分运输之后,还需要手动去添加质量源项吗,还是说在设置好运输模型后,软件会自动将传质的质量项自动添加到方程里?同理的话,如果设置好了化学反应,软件会自动将反应的质量项添加到方程还是需要自己手动添加呢?
    有没有大佬解答一下,非常感谢!!258670ec54e736d15249ae2add504fc2d46269c6.jpg

  • GPU VS CPU

    Algorithm
    7
    0 赞同
    7 帖子
    15k 浏览
    MicroM

    @程迪 在 GPU VS CPU 中说:

    隐式的得回头修改这个自由度那个自由度

    你好,请问您所说的自由度是什么意思,能够稍微解释一二,不胜感激,谢谢!

  • 采样失败,没有数据

    Fluent
    1
    0 赞同
    1 帖子
    2k 浏览

    大佬们,小弟在做DDPM颗粒流,模拟携砂液在裂缝中流动,跑完模型后,我想看出口离散相,连续相的质量分别是多少,以及携砂液何时到达出口的,但是采样总失败。请问该如何设置采样呢?0e1ca153-e191-411c-9fda-d46f9f64d620-9149b8cb4b75dbe718526cdf5755b82.png c03070aa-60fa-4305-9d29-9ef286437ac7-e3d5c6e67663756d6906f0ab09d4a1a.png 74f0187d-ee1f-48d4-9ac7-d6348ba55adb-image.png a6073273-9f2a-4761-9154-65f99b2fc272-image.png

  • DPMFoam求解器加颗粒导致发散

    OpenFOAM
    8
    0 赞同
    8 帖子
    8k 浏览
    疏影横斜水清浅

    @杨英狄 好的,谢谢,我试一试

  • fluent中材料的标准状态焓

    CFD彩虹条
    1
    0 赞同
    1 帖子
    3k 浏览
    T

    想做相变模拟,想请教下fluent中气液相的标准状态焓怎么设置呢?是潜热乘以分子量吗?

  • snappy画船体网格

    Meshy
    4
    0 赞同
    4 帖子
    3k 浏览
    李东岳

    是的

  • fluent燃烧问题

    Fluent
    1
    0 赞同
    1 帖子
    2k 浏览
    P

    650a2e12-bcea-4ddf-aed1-35dea47389d1-image.png

    fluent燃烧问题,ED模型,fluent自带的二步甲烷反应与将二步甲烷反应方程及其置前因子、活化能按同样数值输入后,模拟温度云图差异较大是什么原因

  • 0 赞同
    5 帖子
    10k 浏览
    Y

    @李东岳 请问在哪里下载?东岳流体?

  • 0 赞同
    3 帖子
    5k 浏览
    李东岳

    是单位化的,写起来忒麻烦了没写一会我改一下。

    我试了一下
    \begin{equation}
    P=
    \left(
    \begin{matrix}
    1&2\\
    2&3
    \end{matrix}
    \right)
    \end{equation}
    这个就可以:136:

  • ICEM导出inp文件出错?

    Meshy
    2
    0 赞同
    2 帖子
    4k 浏览
    J

    导出时候选择了如下这些选项
    image.png

  • Reynolds stress model植入到twoPhaseEulerFoam

    OpenFOAM
    3
    0 赞同
    3 帖子
    4k 浏览
    J

    @李东岳 感谢李老师回复!

  • 并行后分块分界面那里会导致异常

    OpenFOAM
    3
    0 赞同
    3 帖子
    3k 浏览
    vbcwlV

    @vbcwl 原因已经大概确定了,应该是因为求解过程中用到了求解梯度的命令,然后每一块单独计算了梯度,请问这样是否会出现这种可能呢?如果是又该怎么解决呢?

  • 关于komegaSSTLM四方程模型

    OpenFOAM
    5
    0 赞同
    5 帖子
    5k 浏览
    C

    @李东岳
    谢谢老师,虽然只是一个小建议和思路,却给我节约了大量的时间,目前已经在OF7中调通了mutiphaseInterFoam求解器。:xiexie:

  • OpenFOAM中的pout与reduce

    OpenFOAM
    1
    0 赞同
    1 帖子
    2k 浏览
    李东岳
    /*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" int main(int argc, char *argv[]) { #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" // For a case being run in parallel, the domain is decomposed into several // processor meshes. Each of them is run in a separate process and holds // instances of objects like mesh, U or p just as in a single-threaded (serial) // computation. These will have different sizes, of course, as they hold // fewer elements than the whole, undecomposed, mesh. // Pout is a stream to which each processor can write, unlike Info which only // gets used by the head process (processor0) Pout << "Hello from processor " << Pstream::myProcNo() << "! I am working on " << mesh.C().size() << " cells" << endl; // To exchange information between processes, special OpenMPI routines need // to be called. // This goes over each cell in the subdomain and integrates their volume. scalar meshVolume(0.); forAll(mesh.V(),cellI) meshVolume += mesh.V()[cellI]; // Add the values from all processes together Pout << "Mesh volume on this processor: " << meshVolume << endl; reduce(meshVolume, sumOp<scalar>()); Info << "Total mesh volume on all processors: " << meshVolume // Note how the reudction operation may be done in place without defning // a temporary variable, where appropriate. << " over " << returnReduce(mesh.C().size(), sumOp<label>()) << " cells" << endl; // During the reduction stage, different operations may be carried out, summation, // described by the sumOp template, being one of them. // Other very useful operations are minOp and maxOp. // Note how the type // of the variable must be added to make an instance of the template, here // this is done by adding <scalar> in front of the brackets. // Custom reduction operations are easy to implement but need fluency in // object-oriented programming in OpenFOAM, so we'll skip this for now. // Spreading a value across all processors is done using a scatter operation. Pstream::scatter(meshVolume); Pout << "Mesh volume on this processor is now " << meshVolume << endl; // It is often useful to check the distribution of something across all // processors. This may be done using a list, with each element of it // being written to by only one processor. List<label> nInternalFaces (Pstream::nProcs()), nBoundaries (Pstream::nProcs()); nInternalFaces[Pstream::myProcNo()] = mesh.Cf().size(); nBoundaries[Pstream::myProcNo()] = mesh.boundary().size(); // The list may then be gathered on the head node as Pstream::gatherList(nInternalFaces); Pstream::gatherList(nBoundaries); // Scattering a list is also possbile Pstream::scatterList(nInternalFaces); Pstream::scatterList(nBoundaries); // It can also be useful to do things on the head node only // (in this case this is meaningless since we are using Info, which already // checks this and executes on the head node). // Note how the gathered lists hold information for all processors now. if (Pstream::master()) { forAll(nInternalFaces,i) Info << "Processor " << i << " has " << nInternalFaces[i] << " internal faces and " << nBoundaries[i] << " boundary patches" << endl; } // As the mesh is decomposed, interfaces between processors are turned // into patches, meaning each subdomain sees a processor boundary as a // boundary condition. forAll(mesh.boundary(),patchI) Pout << "Patch " << patchI << " named " << mesh.boundary()[patchI].name() << endl; // When looking for processor patches, it is useful to check their type, // similarly to how one can check if a patch is of empty type forAll(mesh.boundary(),patchI) { const polyPatch& pp = mesh.boundaryMesh()[patchI]; if (isA<processorPolyPatch>(pp)) Pout << "Patch " << patchI << " named " << mesh.boundary()[patchI].name() << " is definitely a processor boundary!" << endl; } // --- // this is an example implementation of the code from tutoral 2 which // has been adjusted to run in parallel. Each difference is highlighted // as a NOTE. // It is conventional in OpenFOAM to move large parts of code to separate // .H files to make the code of the solver itself more readable. This is not // a standard C++ practice, as header files are normally associated with // declarations rather than definitions. // A very common include, apart from the setRootCase, createTime, and createMesh, // which are generic, is createFields, which is often unique for each solver. // Here we've moved all of the parts of the code dealing with setting up the fields // and transport constants into this include file. #include "createFields.H" // pre-calculate geometric information using field expressions rather than // cell-by-cell assignment. const dimensionedVector originVector("x0", dimLength, vector(0.05,0.05,0.005)); volScalarField r (mag(mesh.C()-originVector)); // NOTE: we need to get a global value; convert from dimensionedScalar to scalar const scalar rFarCell = returnReduce(max(r).value(), maxOp<scalar>()); scalar f (1.); Info<< "\nStarting time loop\n" << endl; while (runTime.loop()) { Info<< "Time = " << runTime.timeName() << nl << endl; // assign values to the field; // sin function expects a dimensionless argument, hence need to convert // current time using .value(). // r has dimensions of length, hence the small value being added to it // needs to match that. // Finally, the result has to match dimensions of pressure, which are // m^2 / s^-2/ p = Foam::sin(2.*constant::mathematical::pi*f*runTime.time().value()) / (r/rFarCell + dimensionedScalar("small", dimLength, 1e-12)) * dimensionedScalar("tmp", dimensionSet(0, 3, -2, 0, 0), 1.); // NOTE: this is needed to update the values on the processor boundaries. // If this is not done, the gradient operator will get confused around the // processor patches. p.correctBoundaryConditions(); // calculate velocity from gradient of pressure U = fvc::grad(p)*dimensionedScalar("tmp", dimTime, 1.); runTime.write(); } Info<< "End\n" << endl; return 0; } // ************************************************************************* //
  • 《无痛苦N-S方程笔记》小错误

    Algorithm
    1
    0 赞同
    1 帖子
    2k 浏览

    今天空闲时间又看了一遍笔记发现有些笔误:
    P9-第三章第一节第二段第五行“将手竖直的防止在水中” 应为“将手竖直的放置在水中”

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

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

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

  • 谁杀死了中国的27岁CFDer

    CFD彩虹条
    3
    0 赞同
    3 帖子
    6k 浏览
    C

    写的时候并没想那么多,只是想做个搞笑轻松的文章,但到了第4部分谁杀死了未来这里,就很难搞笑了。原文用的 “房和车子杀死了中国年轻男生的未来”,换到CFDer这里当然也通用,但这和CFDer就没啥很密切的个性化的联系了,然而如果真要谈一些东西,难免犯禁。其实,该文章本来应该有第三版修改稿,比如下面就是第三版的部分修改稿:

    关于未来

    发散和实验验证,杀死了中国年轻CFDer

    我问过身边一些CFDer对优秀CAE工程师的标准。

    不少人会说:如果自己写UDF,得要他徒手万行代码全收敛,如果他是用现成外挂库,得模拟准确度都是常规的好几倍。

    我问:同龄人当中,能达到这个标准,多么?

    答案自然是寥寥无几。

    然而,改到到后面,行文逻辑还得斟酌更久的时间,这并不是我最开始想忙里偷闲玩一玩的初衷。并且至此,文章也完全沦为娱乐文章了。故,自己也就没有再修改了。

  • 计算时间

    OpenFOAM
    7
    0 赞同
    7 帖子
    8k 浏览

    @疏影横斜水清浅 嗯,好的,谢谢您的回复