OpenFOAM有方法能够使一部分网格不参与计算吗?
-
(Sorry, I don't have chinese input right now)
I once had the exactly same issue!
Check my thesis Chapter 6.3 :
https://scholar.uwindsor.ca/cgi/viewcontent.cgi?article=8585&context=etd
I wrote a paper in this: https://ascelibrary.org/doi/pdf/10.1061/9780784415153.ch06
Figure 2 is the original plate. (Sorry due to copy-right reason, I cannot put it here.)
In my thesis, I had to open the plate with some holes in ICEM. So, I maual dig out the block out of the computation domain.
It's really a painful process.
But it works!
This is the original plate:
This is after the "dig":
-
fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) - fvm::laplacian(nu, U) ); // 固定值 labelList cells = mesh.cellZones()["null"]; vectorField value(cells.size(), Zero); UEqn.setValues(cells, value); if (piso.momentumPredictor()) { solve(UEqn == -fvc::grad(p)); }
可以通过设定一个
null
区域,然后对区域的网格点强行赋值,但就像我之前说的,总觉得边界处需要处理。也就像 @cccrrryyy 说的,变成了浸没边界法。这个代码只是大体上是个思路,需要更深的研究。可以看看fvOptions里面一些源项的处理,都是操纵矩阵的,比如fixedTempresure,meanVelocityForce等, -
@random_ran 主要的,我的边界随时要改变。这样的话就会一直改网格,有点像自适应网格了。。