1、设置为gmsh剖分3角形网格;

feature/ribbon-menu-20240927
simonyan 3 weeks ago
parent 5ed163b058
commit 9d7a9930d1

@ -18,13 +18,11 @@ QString nmDataGeo::createFile()
flag = flag + m_points.size();
nmDataGeoWell wellNums(m_circlesPoint);
geoLines.append(wellNums.createrWell(flag));
geoLines.append("Transfinite Surface(1) = {1}; ");
// geoLines.append("Recombine Surface{1}; ");
// 设置网格厚度,目前只支持单层网格
double gridThickness = 0.2;
geoLines.append(QString("Extrude {0, 0, %1} {Surface{1};Layers{1};Recombine;}").arg(gridThickness));
// geoLines.append("Mesh.Algorithm = 2");
// geoLines.append("Mesh.ElementOrder = 1");
// geoLines.append("Mesh.Mode = 3");
// geoLines.append("Mesh.CharacteristicLengthFactor = 1.0");
return geoLines.join("\n");
}

@ -31,7 +31,5 @@ QString nmDataGeoWell::createrWell(int index)
.arg(index + i + 1)
.arg(circle.pointCount));
}
circleLines.append("Transfinite Surface{1}; ");
circleLines.append("Recombine Surface{1}; ");
return circleLines.join("\n");
}

@ -152,6 +152,7 @@ void nmSubWndGrid::genGrid()
// 设置工作目录
QDir::setCurrent(sDir);
// 要执行的命令和参数
// gmsh.exe -2 oil.geo -o oil.vtk
process.start("gmsh.exe", QStringList() << "-2" << "oil.geo" << "-o" << "oil.vtk");
// 等待命令启动
if (!process.waitForStarted()) {

Loading…
Cancel
Save