|
[Sponsors] |
[mesh manipulation] How to delete selected cells from mesh and update boundary patches |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 29, 2009, 09:02 |
How to delete selected cells from mesh and update boundary patches
|
#1 |
New Member
Join Date: Jun 2009
Posts: 1
Rep Power: 0 |
I have selected some cells using the cellset utility. I now need to permanently delete these cells from the mesh. How would i go about doing this?
After deleting these cells from the mesh, i need to update the boundary patches. Im using OpenFOAM v1.5. I have been through the utilities in >applications>utlities>mesh>manipulation but cannot seem to find the right utility. Which utility is the best for this problem? Would this problem be easier using the patchTool in FOAMX in v1.4.1? I have heard that it is a GUI that you can use to select any faces you are interested in? Thanks in advance for any help! |
|
November 20, 2009, 13:14 |
|
#2 |
New Member
Vasu
Join Date: Oct 2009
Posts: 17
Rep Power: 17 |
Hi there,
I wanted to ask if you've managed to delete the cells? If so could you let me know how, since I'm stuck on the same thing. Cheers, Vasu |
|
November 26, 2009, 05:17 |
|
#3 |
Member
Niklas Winkler
Join Date: Mar 2009
Location: Stockholm, Stockholm, Sweden
Posts: 73
Rep Power: 17 |
The following should work where subsetCells is a labelList. Creates a folder in current timeStep...
/NW word setName("subsetCells"); cellSet currentSet(mesh, setName, subsetCells); // Create mesh subsetting engine fvMeshSubset subsetter(U,mesh); label patchI = -1; subsetter.setLargeCellSubset(currentSet, patchI, true); wordList scalarNames(1); scalarNames[0] = "p"; PtrList<volScalarField> scalarFlds(scalarNames.size()); //extract the slice and write it in a time directory scalarFlds.set(0, subsetter.interpolate(p)); wordList vectorNames(1); vectorNames[0] = "U"; PtrList<volVectorField> vectorFlds(vectorNames.size()); //extract the slice and write it in a time directory vectorFlds.set(0, subsetter.interpolate(U)); subsetter.subMesh().write(); // Subsetting adds 'subset' prefix. forAll(scalarFlds, js) { Info << "subset" << scalarNames[js] << endl; //write the scalar in the current time directory scalarFlds[js].write(); } forAll(vectorFlds, jv) { Info << "subset" << vectorNames[jv] << endl; //write the scalar in the current time directory vectorFlds[jv].write(); } |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fluid Domain moving with Rigid body | Lloyd Sullivan | CFX | 3 | August 17, 2018 10:58 |
Question about adaptive timestepping | Guille1811 | CFX | 25 | November 12, 2017 18:38 |
Difficulty in calculating angular velocity of Savonius turbine simulation | alfaruk | CFX | 14 | March 17, 2017 07:08 |
Error - Solar absorber - Solar Thermal Radiation | MichaelK | CFX | 12 | September 1, 2016 06:15 |
[Netgen] boundary conditions and mesh exporting | vaina74 | OpenFOAM Meshing & Mesh Conversion | 2 | May 27, 2010 10:38 |