nuttita |
September 15, 2017 18:08 |
How to delete faces in faceZone and update mesh during runtime?
Hello,
I'm trying to simulate a dam break flow with lifting gate using interFoam. The gate is lifted with a velocity 6 m/s.
At the beginning, I created the gate as a thin wall using "topoSet" and then "createBaffle". After using "blockMesh", I obtained a "faceZones" file:
Quote:
1
(
baffleFaces
{
type faceZone;
faceLabels List<label>
80
(
45255
45256
45257
45258
45259
45260
.
.
.
flipMap List<bool>
80
(
0
0
0
0
0
0
.
.
.
|
Then, I tried to update the gate position by removing some faces in the faceZone. So I added these lines in the solver (myInterFoam):
Code:
while (runTime.run())
{
label zID = mesh.faceZones().findZoneID("baffleFaces");
faceZone& facesZone = mesh.faceZones()[zID];
forAll(facesZone,II)
{
Info << "\n faceZoneID :::::::::::: " << facesZone[II] << endl;
Info << "\n faceZoneGeo :: " << Cf[II][0] << " "
<< Cf[II][1] << " "
<< Cf[II][2] << endl;
}
I obtained:
Quote:
faceZoneID :: 45255
faceZoneCoordinate :: 0.01 0.005 0.05
faceZoneID :: 45256
faceZoneCoordinate :: 0.005 0.01 0.05
faceZoneID :: 45257
faceZoneCoordinate :: 0.02 0.005 0.05
faceZoneID :: 45258
faceZoneCoordinate :: 0.015 0.01 0.05
faceZoneID :: 45259
faceZoneCoordinate :: 0.03 0.005 0.05
faceZoneID :: 45260
faceZoneCoordinate :: 0.025 0.01 0.05
.
.
.
|
How can I remove some faces in the faceZone and then update mesh?
Thank you.
|