recentpopularlog in

aries1988 : ofm   152

« earlier  
sampleDict & surfaces & zoneName -- CFD Online Discussion Forums

// Surface sampling definition: choice of
// plane : values on plane defined by point, normal.
// patch : values on patch.
// 1] planes are triangulated by default
// 2] patches are not triangulated by default
november 2018 by aries1988
Field value inside a boundary condition class -- CFD Online Discussion Forums
You have the access member function const objectRegistry& db() const. Accessing for example U is done by the code:

const volVectorField& U = db().lookupObject<volVectorField>("U");
For accessing the mesh: when creating a boundary condition, you have access to the patch. You can thus access the mesh with:

const fvMesh& mesh = patch().boundaryMesh().mesh();
c++  ofm  bc 
november 2018 by aries1988
The codedFixedValue boundary condition - sourceflux
We want to be able to set the individual face centered values differently depending on some spatial and/or temporal conditions. This requires a non-constant access to the field stored in our coded boundary condition. Well, as noted before, the coded boundary condition is a fvPatchField and fvPatchField is a Field<Type>. Since we are working with the volVectorField U, we can upcast the coded boundary condition to its grandparent class Field<vector> a.k.a. vectorField, and work with that.
ofm  c++ 
november 2018 by aries1988
phi -= pEqn.flux() vs. linearInterpolate(U) & mesh.Sf() - Page 2 -- CFD Online Discussion Forums

After re-reading your last and previous posts and also Issa's paper and Jasak's Thesis, I think I should clarify this a bit. My previous consideration is NOT right, since H(U) is updated between every two consecutive PISO correctors (so k-1 times along the whole time step, if k is the number of PISO correctors), but ONLY in terms of the cell-centered neighbour velocities U_N, and NOT in terms of the phi contribution inside discretization coefficients (a_N, but also the owner coefficient a_P, which contributes in the construction of the HbyA vector).
algorithm  piso  cfd  programming  ofm 
november 2018 by aries1988
Boundary conditions: Added extrapolatedCalculatedFvPatchField · OpenFOAM/OpenFOAM-dev@7d19244 · GitHub
To be used instead of zeroGradientFvPatchField for temporary fields for
which zero-gradient extrapolation is use to evaluate the boundary field
but avoiding fields derived from temporary field using field algebra
inheriting the zeroGradient boundary condition by the reuse of the
temporary field storage.
bc  ofm 
august 2018 by aries1988
普适性准则 每行最大80个字符 缩进默认4个占位符 使用空格进行缩进,而不是TAB按键 if,else,while,case,for使用的时候附加空格,forAll后不附加空格 前默认空置4个字符并对齐 如 Info<< ... os << ... 下面这种是不正确的: WarningInFunction << "Warning message" 省略没必要的注释 类声明注释居中显示如 /*-----------------------------------------...
best  practice  code  howto  habit  c++  ofm 
july 2018 by aries1988



explained  LES  ofm 
may 2018 by aries1988
New problem in version 4.0! The boundary field become read only! -- CFD Online Discussion Forums
kittychunk is on a distinguished road
Originally Posted by hk318i View Post
I think it is related to this commit [LINK]
This solved the problem for me.

The summary version is that you need to replace instances of "boundaryField()" and "internalField()" with "boundaryFieldRef()" and "internalFieldRef()" if you want to modify them in your code. The non-"Ref" calls are const now.


Seems like internalField and internalFieldRef have been replaced by direct calls to the field variable. Eg: U.internalField() becomes U() for a const reference to the internal field, or U.ref() for non-const access. See associated bug report.
of4  howto  ofm 
march 2018 by aries1988
p_rgh in OF 1.7 -- CFD Online Discussion Forums
To understand the different pressures, look at Bernoulli:

Dynamic pressure --> 1/2*rho*v^2
Hydraulic pressure--> rho*g*h
Static pressure --> p

1/2*rho*v^2 + rho*g*h + p = Constant
definition  ofm 
march 2018 by aries1988
因为最近又开始重写求解器代码,代码又搞得有点多。本篇文章谈一谈OpenFOAM代码方面的杂七杂八,不谈CFD算法,只是编程,算是这些年写代码,重写代码,再重写代码,再再重写代码的总结。 OpenFOAM的入门请参考:OpenFOAM入门建议 第一句:可能有些刚入门CFD的朋友不知道我说的是什么,但你总会明白的。 开源和闭源 现在CFD软件非常多,相对于ANSYS Fluent,OpenFOAM最大的特点是开源,也就是代码是公开的。因此我们可以从代码这方面把所有的CFD软件分为: 闭源CFD求解器,例如...
programming  c++  ofm 
february 2018 by aries1988
計算の確認と計算結果の処理 2018年2月5日 はじめに 計算の確認と計算結果の処理について。 使用バージョン OpenFOAM 5.x 残差の確認 function object を用いる方法 バージョン 2.4.0 から、残差を出力する function object が使える。system/controlDict…
post  cfd  ofm 
february 2018 by aries1988
Modify boundary fields
forAll(field.boundaryField(), I)
scalarField& bScalarField = field.boundaryField()[I];
bScalarField = 123;
programming  explained  moi  ofm 
january 2018 by aries1988
Time averaged fields on a defined time range -- CFD Online Discussion Forums
When I re-run a part of my simulation with this function enabled, it works well. In the "case/timeStep/uniform/fieldAveragingProperties" file, the "totalTime" corresponds to the time from the start of the function and it grows accordingly to time steps which is totally logical. The averaged fields seem ok too.
post  ofm 
january 2018 by aries1988
Installation/Linux/OpenFOAM-2.4.0/Fedora - OpenFOAMWiki
Fedora 22 comes with CMake 3.x, but both ParaView 4.1.0 and CGAL 4.6 need one of the latest of versions from the CMake 2.8.x series. Therefore, we'll need to build the CMake version that is packaged with ThirdParty-2.4.0
fedora  install  ofm 
november 2017 by aries1988
OpenFOAM-4.x/foamSequenceVTKFiles at master · OpenFOAM/OpenFOAM-4.x
# Description
# Creates symbolic links to all VTK files in a post-processing directory
# Links form a sequence like name.0000.vtk, name.0001.vtk, etc.
# Paraview recognises link names as a sequence which can be animated.
# The sequence of links can be used to create a video from the images.
# - Default directory name for VTK files is postProcessing
src  post  paraview  video  tool  ofm 
november 2017 by aries1988
dayigu/ofpp: OpenFOAM Python Parser, parse data in OpenFOAM output files to Numpy array.
Ofpp stands for OpenFOAM Python Parser. It is a simple Python library for parsing data in OpenFOAM output files to Numpy array.

limits: only support ascii format file.
moi  python  post  ofm 
november 2017 by aries1988
« earlier      
per page:    204080120160

Copy this bookmark:

to read