|
[Sponsors] |
[blockMesh] create a mesh without reading from dictionary file |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 9, 2019, 00:40 |
create a mesh without reading from dictionary file
|
#1 |
New Member
Jie Ren
Join Date: Jun 2019
Posts: 2
Rep Power: 0 |
Dear foamers,
I want to generate a new mesh (like a simple cubic one) with 3 vectors calculated from my program, but without referring to the 'blockMeshDict' file. Details as below: To generate a simple cubic blockmesh with all its vertices' positions: 8 vertices in total, which can be derived from two vectors, like (0,0,0) and (1,1,1). The third vector, like (20,20,20) , represent the number of grids in each coordinate. NO boundaries and patches are defined, neither the other mesh settings! Cause it is just used for visualization. To sum up, use 3 vectors to generate a very simple mesh in a program, without reading the 'blockMeshDict' file, and without using the 'blockMesh' utility (but may use it in another form, i am not sure about it...). I've got these 3 vectors in my program, but they are case-dependent, it is cumbersome to edit the file every time....that's why I start to think it. The mesh generated should be identity or similar to that using the 'blockMeshDict' file (as below) and 'blockMesh' utility. // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1; vertices //can be derived from two vectors (0,0,0) & (1,1,1) ( (0 0 0) (1 0 0) (1 1 0) (0 1 0) (0 0 1) (1 0 1) (1 1 1) (0 1 1) ); blocks //the third vector (20 20 20) is necessary ( hex (0 1 2 3 4 5 6 7) (20 20 20) simpleGrading (1 1 1) ); boundary //no defined boundary & patch, just for visualization ( ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // How to create the mesh with 3 known vectors within a program? Should I generate a 'dictionary' object manually without IO, then use it for mesh generation? I am confused about it... Any answer is welcomed, thanks in advance! Jieren |
|
July 9, 2019, 04:44 |
|
#2 | |
Senior Member
Zander Meiring
Join Date: Jul 2018
Posts: 125
Rep Power: 8 |
Quote:
|
||
Tags |
mesh adaption, mesh generation |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] swak4foam for OpenFOAM 4.0 | mnikku | OpenFOAM Community Contributions | 80 | May 17, 2022 09:06 |
how to calculate mass flow rate on patches and summation of that during the run? | immortality | OpenFOAM Post-Processing | 104 | February 16, 2021 09:46 |
SimpleFoam cannot open include file | Marija | OpenFOAM Running, Solving & CFD | 1 | October 28, 2020 11:35 |
[swak4Foam] Error bulding swak4Foam | sfigato | OpenFOAM Community Contributions | 18 | August 22, 2013 13:41 |
[swak4Foam] build problem swak4Foam OF 2.2.0 | mcathela | OpenFOAM Community Contributions | 14 | April 23, 2013 14:59 |