|
[Sponsors] |
[blockMesh] block.H file not found using block class |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 15, 2017, 06:03 |
block.H file not found using block class
|
#1 |
New Member
Join Date: May 2017
Location: France
Posts: 2
Rep Power: 0 |
Hi every body !
I'm very new to openFoam and until now, this forum has been very helpful, so I start with a great thanks ! My problem is the following : I'm trying to do a simulation in a tube in which there is repetitive obstacle. And I would like to be able to change the parameters (height, wide, distance between obstacles...) without having to modify all the points every time. Therefor, I've been using the cylinder tutorial to try to mesh this tube. I managed to create the vertices's by cooping the tutorial, so I'm using a for loop in a codestream and it's working. Code:
vertices #codeStream { codeInclude #{ #include "pointField.H" #}; code #{ pointField points(19); points[0] = point(0.5, 0, -0.5); points[1] = point(1, 0, -0.5); points[2] = point(2, 0, -0.5); points[3] = point(2, 0.707107, -0.5); points[4] = point(0.707107, 0.707107, -0.5); points[5] = point(0.353553, 0.353553, -0.5); points[6] = point(2, 2, -0.5); points[7] = point(0.707107, 2, -0.5); points[8] = point(0, 2, -0.5); points[9] = point(0, 1, -0.5); points[10] = point(0, 0.5, -0.5); points[11] = point(-0.5, 0, -0.5); points[12] = point(-1, 0, -0.5); points[13] = point(-2, 0, -0.5); points[14] = point(-2, 0.707107, -0.5); points[15] = point(-0.707107, 0.707107, -0.5); points[16] = point(-0.353553, 0.353553, -0.5); points[17] = point(-2, 2, -0.5); points[18] = point(-0.707107, 2, -0.5); // Duplicate z points label sz = points.size(); points.setSize(2*sz); for (label i = 0; i < sz; i++) { const point& pt = points[i]; points[i+sz] = point(pt.x(), pt.y(), -pt.z()); } // Duplicate all vertices for (label j = 0; j < 2; j++) { label sx = points.size(); points.setSize(2*sx); for (label i = 0; i < sx; i++) { const point& pt = points[i]; points[i+sx] = point(pt.x()+4, pt.y(), pt.z()); } } os << points; #}; }; But every time I try to run blockMesh, the error is that: error : no such file or directory I've been trying few things: Code:
blocks #codeStream { codeInclude #{ #include "block.H" #}; block block(1); block[0].points = (5, 4, 9, 10, 24, 23, 28, 29); I also tried to do a new blockMesh utility that I called "generator" where I just copied the blockMesh utility and tried to add new libraries in the Make/options file. Make/options: Code:
EXE_INC = \ -I$(OBJECTS_DIR) \ -I$(LIB_SRC)/mesh/blockMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude EXE_LIBS = \ -L$(FOAM_LIBBIN)/libOSspecific.o \ -L$(FOAM_LIBBIN)/dummy -lPstream \ -lz \ -lblockMesh \ -lmeshTools \ -ldynamicMesh Code:
generator.C EXE = $(FOAM_USER_APPBIN)/utilites/mesh/generation/generator I even tried a barbarous way, by adding every files one by one with the full path : Code:
blocks #codeStream { codeInclude #{ #include </opt/openfoam240/src/mesh/blockMesh/curvedEdges/curvedEdgeList.H> #include </opt/openfoam240/src/mesh/blockMesh/blockDescriptor/blockDescriptor.H> #include </opt/openfoam240/src/mesh/blockMesh/block/block.H> #}; So I hope I explained my problem clearly and in the correct place. Hope also that you can help me. Thank you for reading, Silth Last edited by Silth; May 15, 2017 at 10:57. |
|
May 16, 2017, 11:26 |
|
#2 |
New Member
Join Date: May 2017
Location: France
Posts: 2
Rep Power: 0 |
I think I find a solution. I'll learn how to do it with a .m4 file
|
|
Tags |
block, block.h, blockmesh, class, headers |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Tabulated thermophysicalProperties library | chriss85 | OpenFOAM Community Contributions | 62 | October 2, 2022 04:50 |
[swak4Foam] Installation Problem with OF 6 version | Aurel | OpenFOAM Community Contributions | 14 | November 18, 2020 17:18 |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 17:02 |
centOS 5.6 : paraFoam not working | yossi | OpenFOAM Installation | 2 | October 9, 2013 02:41 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |