Skip to content
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
CFD中文网

CFD中文网

  1. CFD中文网
  2. OpenFOAM
  3. 两相流动的部分滑移边界如何设定

两相流动的部分滑移边界如何设定

已定时 已固定 已锁定 已移动 OpenFOAM
12 帖子 2 发布者 5.7k 浏览
  • 从旧到新
  • 从新到旧
  • 最多赞同
回复
  • 在新帖中回复
登录后回复
此主题已被删除。只有拥有主题管理权限的用户可以查看。
  • 鸡 离线
    鸡 离线
    鸡蛋方便面
    在 中回复了 李东岳 最后由 编辑
    #3

    @东岳 老师,∂u/∂n是速度在法向的梯度,如果λ是一常数的话,可以用partial slip边界,可这是两相流动,不知道如何去实现λ和α的关系:141:

    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #4

    我看了一下,确实发现了这个partialSlip边界,这个边界挺有意思,我整理整理背后的算法。你需要做的是去partialSlipFvPatch.C这个文件中,植入下面那段话中的方程,不是特别复杂。

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    鸡 1 条回复 最后回复
  • 鸡 离线
    鸡 离线
    鸡蛋方便面
    在 中回复了 李东岳 最后由 编辑
    #5

    @东岳 老师,我也去过partialSlipFvPatch.C这个文件看过,valueFraction是直接读取的,而那个式子里α的值在每个网格又不同,初学OF不知道怎么去写,老师可以详细指点一下吗?

    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #6

    $\alpha$应该是壁面一层的网格相分数,可以参考 http://www.cfd-china.com/topic/3499 中的 更改壁面一层网格值代码,获取壁面一层的网格相分数,其他类似

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 李东岳 编辑
    #7

    我看了一下,更简单的方法是你去看一下reactingTwoPhaseFoam下的JohnsonJacksonParticleSlip.C边界条件,里面的valueFraction通过this->valueFraction() = c/(c + patch().deltaCoeffs());计算乐,你将其简化并适配更容易。否则你得自己加代码,更难。

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    鸡 1 条回复 最后回复
  • 鸡 离线
    鸡 离线
    鸡蛋方便面
    在 中回复了 李东岳 最后由 编辑
    #8

    @东岳 感谢东岳老师,我在这里看到一个更为简单的particleSlip边界代码,在这个代码里看起来修改valueFraction的计算更简单。但是这个边界条件我复制到自己文件夹后(还未修改代码)wmake libso不成功有很多问题,麻烦老师可以看一下吗?

    • particleSlip边界条件文件压缩包particleSlip-1464.tar
    g++ -std=c++11 -m32 -Dlinux -DWM_ARCH_OPTION=32 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3  -DNoRepository -ftemplate-depth-100 -I/home/cfd/OpenFOAM/OpenFOAM-6/src/finiteVolume/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-6/src/triSurface/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-6/src/meshTools/lnInclude  -IlnInclude -I. -I/home/cfd/OpenFOAM/OpenFOAM-6/src/OpenFOAM/lnInclude -I/home/cfd/OpenFOAM/OpenFOAM-6/src/OSspecific/POSIX/lnInclude   -fPIC -c particleSlipFvPatchVectorField.C -o /home/cfd/OpenFOAM/OpenFOAM-6/platforms/linuxGccDPInt32Opt/run/particleSlip/particleSlipFvPatchVectorField.o
    particleSlipFvPatchVectorField.C: In constructor ‘Foam::particleSlipFvPatchVectorField::particleSlipFvPatchVectorField(const Foam::fvPatch&, const vectorField&)’:
    particleSlipFvPatchVectorField.C:39:40: error: no matching function for call to ‘Foam::partialSlipFvPatchField<Foam::Vector<double> >::partialSlipFvPatchField(const Foam::fvPatch&, const vectorField&)’
         partialSlipFvPatchVectorField(p, iF)
                                            ^
    particleSlipFvPatchVectorField.C:39:40: note: candidates are:
    In file included from partialSlipFvPatchField.H:238:0,
                     from partialSlipFvPatchFields.H:29,
                     from particleSlipFvPatchVectorField.H:33,
                     from particleSlipFvPatchVectorField.C:22:
    partialSlipFvPatchField.C:84:1: note: Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField(const Foam::partialSlipFvPatchField<Type>&, const Foam::DimensionedField<Type, Foam::volMesh>&) [with Type = Foam::Vector<double>]
     Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
     ^
    partialSlipFvPatchField.C:84:1: note:   no known conversion for argument 1 from ‘const Foam::fvPatch’ to ‘const Foam::partialSlipFvPatchField<Foam::Vector<double> >&’
    partialSlipFvPatchField.C:73:1: note: Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField(const Foam::partialSlipFvPatchField<Type>&) [with Type = Foam::Vector<double>]
     Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
     ^
    partialSlipFvPatchField.C:73:1: note:   candidate expects 1 argument, 2 provided
    partialSlipFvPatchField.C:44:1: note: Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField(const Foam::partialSlipFvPatchField<Type>&, const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::volMesh>&, const Foam::fvPatchFieldMapper&) [with Type = Foam::Vector<double>]
     Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
     ^
    partialSlipFvPatchField.C:44:1: note:   candidate expects 4 arguments, 2 provided
    partialSlipFvPatchField.C:58:1: note: Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField(const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::volMesh>&, const Foam::dictionary&) [with Type = Foam::Vector<double>]
     Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
     ^
    partialSlipFvPatchField.C:58:1: note:   candidate expects 3 arguments, 2 provided
    partialSlipFvPatchField.C:32:1: note: Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField(const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::volMesh>&) [with Type = Foam::Vector<double>]
     Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
     ^
    partialSlipFvPatchField.C:32:1: note:   no known conversion for argument 2 from ‘const vectorField {aka const Foam::Field<Foam::Vector<double> >}’ to ‘const Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh>&’
    particleSlipFvPatchVectorField.C: In constructor ‘Foam::particleSlipFvPatchVectorField::particleSlipFvPatchVectorField(const Foam::particleSlipFvPatchVectorField&, const Foam::fvPatch&, const vectorField&, const Foam::fvPatchFieldMapper&)’:
    particleSlipFvPatchVectorField.C:51:55: error: no matching function for call to ‘Foam::partialSlipFvPatchField<Foam::Vector<double> >::partialSlipFvPatchField(const Foam::particleSlipFvPatchVectorField&, const Foam::fvPatch&, const vectorField&, const Foam::fvPatchFieldMapper&)’
         partialSlipFvPatchVectorField(tdpvf, p, iF, mapper)
                                                           ^
    particleSlipFvPatchVectorField.C:51:55: note: candidates are:
    In file included from partialSlipFvPatchField.H:238:0,
                     from partialSlipFvPatchFields.H:29,
                     from particleSlipFvPatchVectorField.H:33,
                     from particleSlipFvPatchVectorField.C:22:
    partialSlipFvPatchField.C:84:1: note: Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField(const Foam::partialSlipFvPatchField<Type>&, const Foam::DimensionedField<Type, Foam::volMesh>&) [with Type = Foam::Vector<double>]
     Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
     ^
    partialSlipFvPatchField.C:84:1: note:   candidate expects 2 arguments, 4 provided
    partialSlipFvPatchField.C:73:1: note: Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField(const Foam::partialSlipFvPatchField<Type>&) [with Type = Foam::Vector<double>]
     Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
     ^
    partialSlipFvPatchField.C:73:1: note:   candidate expects 1 argument, 4 provided
    partialSlipFvPatchField.C:44:1: note: Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField(const Foam::partialSlipFvPatchField<Type>&, const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::volMesh>&, const Foam::fvPatchFieldMapper&) [with Type = Foam::Vector<double>]
     Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
     ^
    partialSlipFvPatchField.C:44:1: note:   no known conversion for argument 3 from ‘const vectorField {aka const Foam::Field<Foam::Vector<double> >}’ to ‘const Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh>&’
    partialSlipFvPatchField.C:58:1: note: Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField(const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::volMesh>&, const Foam::dictionary&) [with Type = Foam::Vector<double>]
     Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
     ^
    partialSlipFvPatchField.C:58:1: note:   candidate expects 3 arguments, 4 provided
    partialSlipFvPatchField.C:32:1: note: Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField(const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::volMesh>&) [with Type = Foam::Vector<double>]
     Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
     ^
    partialSlipFvPatchField.C:32:1: note:   candidate expects 2 arguments, 4 provided
    particleSlipFvPatchVectorField.C: In constructor ‘Foam::particleSlipFvPatchVectorField::particleSlipFvPatchVectorField(const Foam::fvPatch&, const vectorField&, const Foam::dictionary&)’:
    particleSlipFvPatchVectorField.C:62:40: error: no matching function for call to ‘Foam::partialSlipFvPatchField<Foam::Vector<double> >::partialSlipFvPatchField(const Foam::fvPatch&, const vectorField&)’
         partialSlipFvPatchVectorField(p, iF)
                                            ^
    particleSlipFvPatchVectorField.C:62:40: note: candidates are:
    In file included from partialSlipFvPatchField.H:238:0,
                     from partialSlipFvPatchFields.H:29,
                     from particleSlipFvPatchVectorField.H:33,
                     from particleSlipFvPatchVectorField.C:22:
    partialSlipFvPatchField.C:84:1: note: Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField(const Foam::partialSlipFvPatchField<Type>&, const Foam::DimensionedField<Type, Foam::volMesh>&) [with Type = Foam::Vector<double>]
     Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
     ^
    partialSlipFvPatchField.C:84:1: note:   no known conversion for argument 1 from ‘const Foam::fvPatch’ to ‘const Foam::partialSlipFvPatchField<Foam::Vector<double> >&’
    partialSlipFvPatchField.C:73:1: note: Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField(const Foam::partialSlipFvPatchField<Type>&) [with Type = Foam::Vector<double>]
     Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
     ^
    partialSlipFvPatchField.C:73:1: note:   candidate expects 1 argument, 2 provided
    partialSlipFvPatchField.C:44:1: note: Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField(const Foam::partialSlipFvPatchField<Type>&, const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::volMesh>&, const Foam::fvPatchFieldMapper&) [with Type = Foam::Vector<double>]
     Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
     ^
    partialSlipFvPatchField.C:44:1: note:   candidate expects 4 arguments, 2 provided
    partialSlipFvPatchField.C:58:1: note: Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField(const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::volMesh>&, const Foam::dictionary&) [with Type = Foam::Vector<double>]
     Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
     ^
    partialSlipFvPatchField.C:58:1: note:   candidate expects 3 arguments, 2 provided
    partialSlipFvPatchField.C:32:1: note: Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField(const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::volMesh>&) [with Type = Foam::Vector<double>]
     Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
     ^
    partialSlipFvPatchField.C:32:1: note:   no known conversion for argument 2 from ‘const vectorField {aka const Foam::Field<Foam::Vector<double> >}’ to ‘const Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh>&’
    particleSlipFvPatchVectorField.C: In constructor ‘Foam::particleSlipFvPatchVectorField::particleSlipFvPatchVectorField(const Foam::particleSlipFvPatchVectorField&, const vectorField&)’:
    particleSlipFvPatchVectorField.C:84:44: error: no matching function for call to ‘Foam::partialSlipFvPatchField<Foam::Vector<double> >::partialSlipFvPatchField(const Foam::particleSlipFvPatchVectorField&, const vectorField&)’
         partialSlipFvPatchVectorField(tdpvf, iF)
                                                ^
    particleSlipFvPatchVectorField.C:84:44: note: candidates are:
    In file included from partialSlipFvPatchField.H:238:0,
                     from partialSlipFvPatchFields.H:29,
                     from particleSlipFvPatchVectorField.H:33,
                     from particleSlipFvPatchVectorField.C:22:
    partialSlipFvPatchField.C:84:1: note: Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField(const Foam::partialSlipFvPatchField<Type>&, const Foam::DimensionedField<Type, Foam::volMesh>&) [with Type = Foam::Vector<double>]
     Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
     ^
    partialSlipFvPatchField.C:84:1: note:   no known conversion for argument 2 from ‘const vectorField {aka const Foam::Field<Foam::Vector<double> >}’ to ‘const Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh>&’
    partialSlipFvPatchField.C:73:1: note: Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField(const Foam::partialSlipFvPatchField<Type>&) [with Type = Foam::Vector<double>]
     Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
     ^
    partialSlipFvPatchField.C:73:1: note:   candidate expects 1 argument, 2 provided
    partialSlipFvPatchField.C:44:1: note: Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField(const Foam::partialSlipFvPatchField<Type>&, const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::volMesh>&, const Foam::fvPatchFieldMapper&) [with Type = Foam::Vector<double>]
     Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
     ^
    partialSlipFvPatchField.C:44:1: note:   candidate expects 4 arguments, 2 provided
    partialSlipFvPatchField.C:58:1: note: Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField(const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::volMesh>&, const Foam::dictionary&) [with Type = Foam::Vector<double>]
     Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
     ^
    partialSlipFvPatchField.C:58:1: note:   candidate expects 3 arguments, 2 provided
    partialSlipFvPatchField.C:32:1: note: Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField(const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::volMesh>&) [with Type = Foam::Vector<double>]
     Foam::partialSlipFvPatchField<Type>::partialSlipFvPatchField
     ^
    partialSlipFvPatchField.C:32:1: note:   no known conversion for argument 1 from ‘const Foam::particleSlipFvPatchVectorField’ to ‘const Foam::fvPatch&’
    particleSlipFvPatchVectorField.C: In member function ‘virtual void Foam::particleSlipFvPatchVectorField::updateCoeffs()’:
    particleSlipFvPatchVectorField.C:106:41: error: ‘lookupPatchField’ was not declared in this scope
         const fvPatchField<scalar>& alpha = lookupPatchField<volScalarField, scalar>
                                             ^
    particleSlipFvPatchVectorField.C:106:72: error: expected primary-expression before ‘,’ token
         const fvPatchField<scalar>& alpha = lookupPatchField<volScalarField, scalar>
                                                                            ^
    make: *** [/home/cfd/OpenFOAM/OpenFOAM-6/platforms/linuxGccDPInt32Opt/run/particleSlip/particleSlipFvPatchVectorField.o] Error 1
    
    
    鸡 1 条回复 最后回复
  • 鸡 离线
    鸡 离线
    鸡蛋方便面
    在 中回复了 鸡蛋方便面 最后由 编辑
    #9

    补充一下,出现上述编译错误前,我修改了make文件夹中的files和option:

    • files
    particleSlipFvPatchVectorField.C
    
    LIB = $(FOAM_USER_LIBBIN)/mylibparticleSlip
    
    • option
    EXE_INC = \
        -I$(LIB_SRC)/finiteVolume/lnInclude \    
        -I$(LIB_SRC)/triSurface/lnInclude \ 
        -I$(LIB_SRC)/meshTools/lnInclude \ 
    
    LIB_LIBS = \
        -lfiniteVolume \
        -lOpenFOAM \
        -ltriSurface \
        -lmeshTools  \
        -lparticleSlip
    
    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #10

    那是一个特别老的代码,很明显会出现问题。这些代码在新版本里基本上是不能用的。你最好先学OpenFOAM编程后再做这个工作,急不得

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    鸡 1 条回复 最后回复
  • 鸡 离线
    鸡 离线
    鸡蛋方便面
    在 中回复了 李东岳 最后由 编辑
    #11

    @东岳 感谢东岳老师指点:xiexie: ,我以particleSlip边界这个老代码为基础,参照JohnsonJacksonParticleSlip边界,发现确实有一些新老代码语句上的表达不同。我对其进行语句上的修改,然后编译成功了,希望这些能对和我有类似问题的同学有一丝帮助。

    1 条回复 最后回复
  • 李东岳李 在线
    李东岳李 在线
    李东岳 管理员
    写于 最后由 编辑
    #12

    很厉害很厉害!!

    http://dyfluid.com/index.html
    需要帮助debug算例的看这个 https://cfd-china.com/topic/8018

    1 条回复 最后回复

  • 登录

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]