Understand more about flow field in CFD

Flow Field will be transformed into a column of vector consists of unknown velocity variables.

Understanding of discrete process

Field itself is a vector in linear algebraic equation, which will be multiplied by coefficient matrix. A row in matrix contains the coefficients of the discrete algebraic equation with respect to a point in field.

In finite difference, a partial differential equation(PDE) is implemented to every grid point. One PDE at a given grid point belongs to only one point and the solution of the PDE is the unknown value of the grid point. However, numerical scheme is a discrete operator transforming a PDE at a point into several items at several neighbouring grid points.

Harvest in programming CFD solver

  1. System of equations in CFD can be interpreted as a matrix in code
  2. Flow field, RHS of system of equations and explicit part of the LHS of system of equations can be thought to be a vector(which is said to be Field in OpenFOAM manner).
  3. Returned type of numerical scheme function(ddt(), div(), etc.) can be Matrix for implicit scheme or Vector(Field) for explicit scheme. For implicit scheme, the coefficients and unknown variables should be in LHS of equations(matrix). However, for explicit scheme, the coefficients and variables should be sum up to form a single term locating at the RHS of equations.
  4. Numerical scheme function should be a global function which does not rely on a specific class object.
  5. To construct an equation in a way like writing the formula, the operator == should be overloaded to connect a matrix and a vector in a good way.

TODO list

  1. Compose a matrix class and a vector class to form an equation class.
  2. Add numerical scheme function.
  3. Add overload operator + and operator == to equation class.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值