CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[blockMesh] blockMesh with double grading.

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree68Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 25, 2015, 06:08
Default
  #81
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 448
Rep Power: 14
syavash is on a distinguished road
Quote:
Originally Posted by akidess View Post
Dear Anton,
How can I download and compile the official version?
Through using "git clone ..." and then "wmake"??

Thanks
syavash is offline   Reply With Quote

Old   September 28, 2015, 10:19
Default blockMesh (not blockMeshDG) multi-grading error
  #82
Senior Member
 
Join Date: Sep 2015
Location: Singapore
Posts: 101
Rep Power: 7
usv001 is on a distinguished road
Hello everyone,

I have just started to learn OpenFOAM. I have been fumbling with blockMesh since morning. I think I've gotten the gist of it but I encounter the following problem when I try to do multi-grading (not using blockMeshDG):

--> FOAM FATAL IO ERROR:
wrong token type - expected Scalar, found on line 38 the punctuation token '('


Heres' my code:

blocks
(
hex (0 1 2 3 4 5 6 7) (25 10 1) simpleGrading
( ((0.5 0.5 1) (0.5 0.5 1)) 1 1 ) // line 38
);

Thanks in advance!
usv001 is offline   Reply With Quote

Old   September 28, 2015, 11:00
Default
  #83
Senior Member
 
Join Date: Sep 2015
Location: Singapore
Posts: 101
Rep Power: 7
usv001 is on a distinguished road
Hello everyone,

I just realized that I have OF 2.2.1 but multi-grading is only available in OF 2.4+.

I am running Ubuntu 12.04.5 LTS. May I know how to update to the current version. By the way, I have installed CAE-Linux. I am new to the whole Linux thing as well.

Thanks in advance!
usv001 is offline   Reply With Quote

Old   September 28, 2015, 12:11
Default
  #84
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 448
Rep Power: 14
syavash is on a distinguished road
Quote:
Originally Posted by usv001 View Post
Hello everyone,

I just realized that I have OF 2.2.1 but multi-grading is only available in OF 2.4+.

I am running Ubuntu 12.04.5 LTS. May I know how to update to the current version. By the way, I have installed CAE-Linux. I am new to the whole Linux thing as well.

Thanks in advance!
Hi,
I just downloaded whole the package of OF 2.4 and then replaced the blockMesh of this version with the one native to OF 2.3.1 and compiled it with "wmake". Now it works perfectly!
Goodluck
syavash is offline   Reply With Quote

Old   September 28, 2015, 23:54
Default
  #85
Senior Member
 
Join Date: Sep 2015
Location: Singapore
Posts: 101
Rep Power: 7
usv001 is on a distinguished road
Hi syavash,

Many thanks for your quick reply.

I have been trying to do as you said for a long time but have been facing many problems. Here is what I am doing:

1. Copied the blockMesh files from the src/mesh/blockMesh directory to the same directory in current version
2. Run wmake from /opt/.../src/mesh/blockMesh (had to run as sudo bash - otherwise I get an error)
3. Run wmake from /opt/.../applications/utilities/mesh/generation/blockMesh

When I try to run blockMesh, the problem still persists. That is, it does not recognize the multi-grading; says there is a wrong token type due to '(' symbol.

May I know what am I doing wrong here?

Once again, thanks in advance!
usv001 is offline   Reply With Quote

Old   October 11, 2015, 09:03
Default
  #86
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,956
Blog Entries: 45
Rep Power: 122
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all,

Here's how you can build the latest blockMesh from 2.4.x in older OpenFOAM versions:
  1. Create and go into your user folder that OpenFOAM assigns to you:
    Code:
    mkdir -p $FOAM_RUN
    run
    cd ..
    Or by running:
    Code:
    mkdir -p $WM_PROJECT_USER_DIR
    cd $WM_PROJECT_USER_DIR
  2. Now, if you have subversion (svn) installed, you can do the following commands:
    Code:
    mkdir blockMesh24x
    cd blockMesh24x
    svn checkout https://github.com/OpenFOAM/OpenFOAM-2.4.x/trunk/src/mesh/blockMesh blockMeshLib
    svn checkout https://github.com/OpenFOAM/OpenFOAM-2.4.x/trunk/applications/utilities/mesh/generation/blockMesh blockMeshApp
    • If you do not have svn installed, then you need to download and unpack the whole source code package from https://github.com/OpenFOAM/OpenFOAM-2.4.x/ (see the big ZIP button on the middle-right side of the page). Then copy the folders to and from similarly as shown in the commands above.
  3. Then modify the files so that the mesher will be built for your own use as a custom application, by running these commands:
    Code:
    sed -i -e 's=FOAM_LIBBIN=FOAM_USER_LIBBIN=' -e 's=libblockMesh=libblockMesh24x=' blockMeshLib/Make/files
    
    sed -i -e 's=FOAM_APPBIN=FOAM_USER_APPBIN=' -e 's=/blockMesh=/blockMesh24x=' blockMeshApp/Make/files
    
    sed  -i -e 's=\-lblockMesh=-L$(FOAM_USER_LIBBIN) -lblockMesh24x=' -e  's=\-I$(LIB_SRC)/mesh/blockMesh=-I../blockMeshLib='  blockMeshApp/Make/options
  4. And now you can build it by running:
    Code:
    wmake libso blockMeshLib
    wmake blockMeshApp
  5. Finally, now whenever you want to use blockMesh, you should instead run:
    Code:
    blockMesh24x
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 20, 2016, 14:01
Default
  #87
New Member
 
Ali Ghavami
Join Date: Oct 2016
Posts: 1
Rep Power: 0
alighavami13 is on a distinguished road
hi, thank you very much for your helping, I highly appreciate it. I just have a question : when I write wmake I get this error:
Making dependency list for source file blockMeshApp.C
Making dependency list for source file blockBoundary.C
Making dependency list for source file blockCells.C
Making dependency list for source file blockPoints.C
Making dependency list for source file createPatches.C
Making dependency list for source file createCells.C
Making dependency list for source file createPoints.C
Making dependency list for source file createMergeList.C
Making dependency list for source file createBlockOffsets.C
Making dependency list for source file checkBlockMesh.C
Making dependency list for source file createTopology.C
Making dependency list for source file block.C
Making dependency list for source file setEdge.C
Making dependency list for source file blockDescriptor.C
Making dependency list for source file blockMesh.C
Making dependency list for source file curvedEdges/splineEdge.C
Making dependency list for source file curvedEdges/CatmullRomSpline.C
Making dependency list for source file curvedEdges/lineDivide.C
Making dependency list for source file curvedEdges/BSpline.C
Making dependency list for source file curvedEdges/arcEdge.C
Making dependency list for source file curvedEdges/polyLineEdge.C
Making dependency list for source file curvedEdges/polyLine.C
Making dependency list for source file curvedEdges/lineEdge.C
Making dependency list for source file curvedEdges/curvedEdge.C
g++ -std=c++0x -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -IcurvedEdges -I/opt/openfoam4/src/meshTools/lnInclude -I/opt/openfoam4/src/dynamicMesh/lnInclude -IlnInclude -I. -I/opt/openfoam4/src/OpenFOAM/lnInclude -I/opt/openfoam4/src/OSspecific/POSIX/lnInclude -fPIC -c curvedEdges/curvedEdge.C -o Make/linux64GccDPInt32Opt/curvedEdges/curvedEdge.o
g++ -std=c++0x -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -IcurvedEdges -I/opt/openfoam4/src/meshTools/lnInclude -I/opt/openfoam4/src/dynamicMesh/lnInclude -IlnInclude -I. -I/opt/openfoam4/src/OpenFOAM/lnInclude -I/opt/openfoam4/src/OSspecific/POSIX/lnInclude -fPIC -c curvedEdges/lineEdge.C -o Make/linux64GccDPInt32Opt/curvedEdges/lineEdge.o
g++ -std=c++0x -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -IcurvedEdges -I/opt/openfoam4/src/meshTools/lnInclude -I/opt/openfoam4/src/dynamicMesh/lnInclude -IlnInclude -I. -I/opt/openfoam4/src/OpenFOAM/lnInclude -I/opt/openfoam4/src/OSspecific/POSIX/lnInclude -fPIC -c curvedEdges/polyLine.C -o Make/linux64GccDPInt32Opt/curvedEdges/polyLine.o
g++ -std=c++0x -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -IcurvedEdges -I/opt/openfoam4/src/meshTools/lnInclude -I/opt/openfoam4/src/dynamicMesh/lnInclude -IlnInclude -I. -I/opt/openfoam4/src/OpenFOAM/lnInclude -I/opt/openfoam4/src/OSspecific/POSIX/lnInclude -fPIC -c curvedEdges/polyLineEdge.C -o Make/linux64GccDPInt32Opt/curvedEdges/polyLineEdge.o
g++ -std=c++0x -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -IcurvedEdges -I/opt/openfoam4/src/meshTools/lnInclude -I/opt/openfoam4/src/dynamicMesh/lnInclude -IlnInclude -I. -I/opt/openfoam4/src/OpenFOAM/lnInclude -I/opt/openfoam4/src/OSspecific/POSIX/lnInclude -fPIC -c curvedEdges/arcEdge.C -o Make/linux64GccDPInt32Opt/curvedEdges/arcEdge.o
curvedEdges/arcEdge.C: In member function ‘Foam::cylindricalCS Foam::arcEdge::calcAngle()’:
curvedEdges/arcEdge.C:74:17: error: ‘mathematicalConstant’ has not been declared
* 180.0/mathematicalConstant:i;
^
curvedEdges/arcEdge.C: In member function ‘virtual Foam::scalar Foam::arcEdge::length() const’:
curvedEdges/arcEdge.C:161:33: error: ‘mathematicalConstant’ has not been declared
return (angle_ * radius_) * mathematicalConstant:i/180.0;
^
/opt/openfoam4/wmake/rules/General/transform:8: recipe for target 'Make/linux64GccDPInt32Opt/curvedEdges/arcEdge.o' failed
make: *** [Make/linux64GccDPInt32Opt/curvedEdges/arcEdge.o] Error 1

I am a new user, can you please help me to fix it?
thank you very much again
alighavami13 is offline   Reply With Quote

Old   July 6, 2018, 03:46
Default Missing Time.H
  #88
Senior Member
 
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 194
Rep Power: 13
sita is on a distinguished road
Hi all,


Thanks a lot for those instructions on installing the newest version of blockMesh!



I'm using foam-extend-4.0 on Ubuntu 18.04, and when I follow the instructions (using svn), I get errors on the first wmake command (wmake libso blockMeshLib), about a missing Time.H (see output below).


Does anyone know how to fix this?


Thanks in advance!
Sita


Code:
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file curvedEdges/lineDivide.C
Making dependency list for source file curvedEdges/lineEdge.C
Making dependency list for source file curvedEdges/BSpline.C
Making dependency list for source file curvedEdges/polyLine.C
Making dependency list for source file curvedEdges/curvedEdge.C
Making dependency list for source file curvedEdges/arcEdge.C
Making dependency list for source file curvedEdges/polyLineEdge.C
Making dependency list for source file curvedEdges/CatmullRomSpline.C
Making dependency list for source file curvedEdges/BSplineEdge.C
Making dependency list for source file curvedEdges/splineEdge.C
Making dependency list for source file gradingDescriptor/gradingDescriptor.C
Making dependency list for source file gradingDescriptor/gradingDescriptors.C
Making dependency list for source file block/block.C
Making dependency list for source file blockDescriptor/blockDescriptor.C
Making dependency list for source file blockDescriptor/blockDescriptorEdges.C
Making dependency list for source file block/blockCreate.C
Making dependency list for source file blockMesh/blockMeshCreate.C
Making dependency list for source file blockMesh/blockMesh.C
Making dependency list for source file blockMesh/blockMeshTopology.C
Making dependency list for source file blockMesh/blockMeshCheck.C
Making dependency list for source file blockMesh/blockMeshMerge.C
Making dependency list for source file blockMesh/blockMeshMergeFast.C
could not open file Time.H for source file blockMesh/blockMeshTopology.C
SOURCE=curvedEdges/curvedEdge.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/administrator/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/administrator/foam/foam-extend-4.0/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/administrator/foam/foam-extend-4.0/src/foam/lnInclude -I/home/administrator/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/curvedEdge.o
SOURCE=curvedEdges/CatmullRomSpline.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/administrator/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/administrator/foam/foam-extend-4.0/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/administrator/foam/foam-extend-4.0/src/foam/lnInclude -I/home/administrator/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/CatmullRomSpline.o
SOURCE=curvedEdges/BSpline.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/administrator/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/administrator/foam/foam-extend-4.0/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/administrator/foam/foam-extend-4.0/src/foam/lnInclude -I/home/administrator/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/BSpline.o
SOURCE=curvedEdges/lineDivide.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/administrator/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/administrator/foam/foam-extend-4.0/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/administrator/foam/foam-extend-4.0/src/foam/lnInclude -I/home/administrator/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/lineDivide.o
SOURCE=curvedEdges/polyLine.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/administrator/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/administrator/foam/foam-extend-4.0/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/administrator/foam/foam-extend-4.0/src/foam/lnInclude -I/home/administrator/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/polyLine.o
SOURCE=curvedEdges/arcEdge.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/administrator/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/administrator/foam/foam-extend-4.0/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/administrator/foam/foam-extend-4.0/src/foam/lnInclude -I/home/administrator/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/arcEdge.o
SOURCE=curvedEdges/lineEdge.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/administrator/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/administrator/foam/foam-extend-4.0/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/administrator/foam/foam-extend-4.0/src/foam/lnInclude -I/home/administrator/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/lineEdge.o
SOURCE=curvedEdges/polyLineEdge.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/administrator/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/administrator/foam/foam-extend-4.0/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/administrator/foam/foam-extend-4.0/src/foam/lnInclude -I/home/administrator/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/polyLineEdge.o
curvedEdges/curvedEdge.C:142:16: warning: ‘Foam::Ostream& Foam::operator<<(Foam::Ostream&, const Foam::curvedEdge&)’ has not been declared within Foam
 Foam::Ostream& Foam::operator<<(Ostream& os, const curvedEdge& p)
                ^~~~
In file included from curvedEdges/curvedEdge.C:27:0:
curvedEdges/curvedEdge.H:168:25: note: only here as a friend
         friend Ostream& operator<<(Ostream&, const curvedEdge&);
                         ^~~~~~~~
SOURCE=curvedEdges/BSplineEdge.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/administrator/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/administrator/foam/foam-extend-4.0/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/administrator/foam/foam-extend-4.0/src/foam/lnInclude -I/home/administrator/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/BSplineEdge.o
SOURCE=curvedEdges/splineEdge.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/administrator/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/administrator/foam/foam-extend-4.0/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/administrator/foam/foam-extend-4.0/src/foam/lnInclude -I/home/administrator/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/splineEdge.o
SOURCE=gradingDescriptor/gradingDescriptor.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/administrator/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/administrator/foam/foam-extend-4.0/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/administrator/foam/foam-extend-4.0/src/foam/lnInclude -I/home/administrator/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/gradingDescriptor.o
SOURCE=gradingDescriptor/gradingDescriptors.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/administrator/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/administrator/foam/foam-extend-4.0/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/administrator/foam/foam-extend-4.0/src/foam/lnInclude -I/home/administrator/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/gradingDescriptors.o
SOURCE=blockDescriptor/blockDescriptor.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/administrator/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/administrator/foam/foam-extend-4.0/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/administrator/foam/foam-extend-4.0/src/foam/lnInclude -I/home/administrator/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/blockDescriptor.o
SOURCE=blockDescriptor/blockDescriptorEdges.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/administrator/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/administrator/foam/foam-extend-4.0/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/administrator/foam/foam-extend-4.0/src/foam/lnInclude -I/home/administrator/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/blockDescriptorEdges.o
SOURCE=block/block.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/administrator/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/administrator/foam/foam-extend-4.0/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/administrator/foam/foam-extend-4.0/src/foam/lnInclude -I/home/administrator/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/block.o
SOURCE=block/blockCreate.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/administrator/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/administrator/foam/foam-extend-4.0/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/administrator/foam/foam-extend-4.0/src/foam/lnInclude -I/home/administrator/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/blockCreate.o
SOURCE=blockMesh/blockMesh.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/administrator/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/administrator/foam/foam-extend-4.0/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/administrator/foam/foam-extend-4.0/src/foam/lnInclude -I/home/administrator/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/blockMesh.o
blockMesh/blockMesh.C:35:35: error: macro "defineDebugSwitch" requires 3 arguments, but only 2 given
     defineDebugSwitch(blockMesh, 0);
                                   ^
SOURCE=blockMesh/blockMeshCreate.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/administrator/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/administrator/foam/foam-extend-4.0/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/administrator/foam/foam-extend-4.0/src/foam/lnInclude -I/home/administrator/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/blockMeshCreate.o
SOURCE=blockMesh/blockMeshTopology.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/administrator/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/administrator/foam/foam-extend-4.0/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/administrator/foam/foam-extend-4.0/src/foam/lnInclude -I/home/administrator/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/blockMeshTopology.o
SOURCE=blockMesh/blockMeshCheck.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I/home/administrator/foam/foam-extend-4.0/src/meshTools/lnInclude     -I/home/administrator/foam/foam-extend-4.0/src/dynamicMesh/lnInclude -IlnInclude -I. -I/home/administrator/foam/foam-extend-4.0/src/foam/lnInclude -I/home/administrator/foam/foam-extend-4.0/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/blockMeshCheck.o
blockMesh/blockMeshTopology.C:27:10: fatal error: Time.H: No such file or directory
 #include "Time.H"
          ^~~~~~~~
compilation terminated.
blockMesh/blockMeshTopology.dep:330: recipe for target 'Make/linux64GccDPOpt/blockMeshTopology.o' failed
make: *** [Make/linux64GccDPOpt/blockMeshTopology.o] Error 1
make: *** Waiting for unfinished jobs....
blockMesh/blockMesh.C:35:5: error: ‘defineDebugSwitch’ does not name a type
     defineDebugSwitch(blockMesh, 0);
     ^~~~~~~~~~~~~~~~~
blockMesh/blockMesh.dep:324: recipe for target 'Make/linux64GccDPOpt/blockMesh.o' failed
make: *** [Make/linux64GccDPOpt/blockMesh.o] Error 1
sita is offline   Reply With Quote

Old   July 23, 2018, 14:29
Default
  #89
New Member
 
Kellis
Join Date: Mar 2017
Posts: 19
Rep Power: 5
Kellis is on a distinguished road
Quote:
Originally Posted by sita View Post
I'm using foam-extend-4.0 on Ubuntu 18.04, and when I follow the instructions (using svn), I get errors on the first wmake command (wmake libso blockMeshLib), about a missing Time.H (see output below).

I'm having a similar issue with Foam Extend, v3.2. If anyone finds a solution please let us know!


Thanks,
Kellis
Kellis is offline   Reply With Quote

Old   July 24, 2018, 16:48
Default
  #90
New Member
 
Kellis
Join Date: Mar 2017
Posts: 19
Rep Power: 5
Kellis is on a distinguished road
Quote:
Originally Posted by sita View Post
I'm using foam-extend-4.0 on Ubuntu 18.04, and when I follow the instructions (using svn), I get errors on the first wmake command (wmake libso blockMeshLib), about a missing Time.H (see output below).

Does anyone know how to fix this?
Sita (and other Foam Extend users),

I have made some progress on a solution but still can't get the blockMeshApp directory to compile properly. Here is what I have done so far:

The first issue lies in the fact this version of blockMesh was built for standard OpenFOAM. In standard OF, there is a file "Time.H" which builds the class for time-related stuff. In Foam-Extend, this file was renamed to "foamTime.H" which is the source of the error Sita was experiencing. To fix this, one line is edited in the following files:

blockMeshLib/blockMesh/blockMeshTopolgy.C
blockMeshApp/blockMeshApp.C

Near the top, change this line:

Code:
#include "Time.H"
to this:

Code:
#include "foamTime.H"
Once you fix this, if you try to compile the blockMeshLib directory, you'll be presented with another error about more missing files. This arises because the source code directory structure is different between standard and extend. To fix it, you need to edit a line in the following two files:

blockMeshLib/Make/options
blockMeshApp/Make/options

In each file you will see a line dealing with the dynamicMesh directory. Change it to look like this:

Code:
-I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude
i.e. make it go into a folder named dynamicMesh twice, which is where the lnInclude files are located.

When I tried to compile this, I got an error that the "defineDebugSwitch" line in the blockMesh.C error had the wrong number of arguments. I just commented it out since I couldn't find a similar example in the Foam Extend source code.

With these changes, the blockMeshLib directory will compile without error. However, the blockMeshApp still gives many errors when compiling:

Code:
$:~/foam/kckincaid-3.2/blockMesh24x$ wmake blockMeshApp
Making dependency list for source file blockMeshApp.C
SOURCE=blockMeshApp.C ;  g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-200 -I../blockMeshLib/lnInclude     -I/home/kckincaid/foam/foam-extend-3.2/src/meshTools/lnInclude     -I/home/kckincaid/foam/foam-extend-3.2/src/dynamicMesh/dynamicMesh/lnInclude     -I/home/kckincaid/foam/foam-extend-3.2/applications/utilities/mesh/manipulation/attachMesh -IlnInclude -I. -I/home/kckincaid/foam/foam-extend-3.2/src/foam/lnInclude -I/home/kckincaid/foam/foam-extend-3.2/src/OSspecific/POSIX/lnInclude   -fPIC -c $SOURCE -o Make/linux64GccDPOpt/blockMeshApp.o
blockMeshApp.C: In function ‘int main(int, char**)’:
blockMeshApp.C:74:5: error: ‘addBoolOption’ is not a member of ‘Foam::argList’
     argList::addBoolOption
     ^
blockMeshApp.C:79:5: error: ‘addOption’ is not a member of ‘Foam::argList’
     argList::addOption
     ^
blockMeshApp.C:96:79: error: no matching function for call to ‘Foam::argList::optionReadIfPresent(const char [7], Foam::word&, Foam::word&)’
    if (args.optionReadIfPresent("region", regionName, polyMesh::defaultRegion))
                                                                              ^
In file included from blockMeshApp.C:60:0:
/home/kckincaid/foam/foam-extend-3.2/src/foam/lnInclude/argList.H:249:18: note: candidate: template<class T> bool Foam::argList::optionReadIfPresent(const Foam::word&, T&) const
             bool optionReadIfPresent(const word& opt, T& val) const
                  ^
/home/kckincaid/foam/foam-extend-3.2/src/foam/lnInclude/argList.H:249:18: note:   template argument deduction/substitution failed:
blockMeshApp.C:96:79: note:   candidate expects 2 arguments, 3 provided
    if (args.optionReadIfPresent("region", regionName, polyMesh::defaultRegion))
                                                                              ^
blockMeshApp.C:109:24: error: no match for ‘operator[]’ (operand types are ‘Foam::argList’ and ‘const char [5]’)
         dictPath = args["dict"];
                        ^
In file included from blockMeshApp.C:237:0:
mergePatchPairs.H:114:21: error: no matching function for call to ‘Foam::slidingInterface::slidingInterface(std::__cxx11::basic_string<char>, Foam::label&, Foam::attachPolyTopoChanger&, std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, Foam::word&, Foam::word&, Foam::slidingInterface::typeOfMatch, Foam::intersection::algorithm)’
                     )
                     ^
In file included from blockMeshApp.C:65:0:
/home/kckincaid/foam/foam-extend-3.2/src/dynamicMesh/dynamicMesh/lnInclude/slidingInterface.H:316:9: note: candidate: Foam::slidingInterface::slidingInterface(const Foam::word&, const Foam::dictionary&, Foam::label, const Foam::polyTopoChanger&)
         slidingInterface
         ^
/home/kckincaid/foam/foam-extend-3.2/src/dynamicMesh/dynamicMesh/lnInclude/slidingInterface.H:316:9: note:   candidate expects 4 arguments, 11 provided
/home/kckincaid/foam/foam-extend-3.2/src/dynamicMesh/dynamicMesh/lnInclude/slidingInterface.H:299:9: note: candidate: Foam::slidingInterface::slidingInterface(const Foam::word&, Foam::label, const Foam::polyTopoChanger&, const Foam::word&, const Foam::word&, const Foam::word&, const Foam::word&, const Foam::word&, const Foam::word&, Foam::slidingInterface::typeOfMatch, bool, Foam::intersection::algorithm)
         slidingInterface
         ^
/home/kckincaid/foam/foam-extend-3.2/src/dynamicMesh/dynamicMesh/lnInclude/slidingInterface.H:299:9: note:   candidate expects 12 arguments, 11 provided
/home/kckincaid/foam/foam-extend-3.2/src/dynamicMesh/dynamicMesh/lnInclude/slidingInterface.H:197:9: note: candidate: Foam::slidingInterface::slidingInterface(const Foam::slidingInterface&)
         slidingInterface(const slidingInterface&);
         ^
/home/kckincaid/foam/foam-extend-3.2/src/dynamicMesh/dynamicMesh/lnInclude/slidingInterface.H:197:9: note:   candidate expects 1 argument, 11 provided
blockMeshApp.C:320:69: error: no matching function for call to ‘Foam::cellSet::cellSet(Foam::polyMesh&, const Foam::word&, Foam::DynamicList<int>&)’
             cellSet cset(mesh, iter.key(), zoneCells[zoneI].shrink());
                                                                     ^
In file included from blockMeshApp.C:58:0:
/home/kckincaid/foam/foam-extend-3.2/src/meshTools/lnInclude/cellSet.H:128:13: note: candidate: Foam::cellSet::cellSet(const Foam::Time&, const Foam::word&, const labelHashSet&, Foam::IOobject::writeOption)
             cellSet
             ^
/home/kckincaid/foam/foam-extend-3.2/src/meshTools/lnInclude/cellSet.H:128:13: note:   no known conversion for argument 1 from ‘Foam::polyMesh’ to ‘const Foam::Time&’
/home/kckincaid/foam/foam-extend-3.2/src/meshTools/lnInclude/cellSet.H:119:13: note: candidate: Foam::cellSet::cellSet(const Foam::Time&, const Foam::word&, Foam::label, Foam::IOobject::writeOption)
             cellSet
             ^
/home/kckincaid/foam/foam-extend-3.2/src/meshTools/lnInclude/cellSet.H:119:13: note:   no known conversion for argument 1 from ‘Foam::polyMesh’ to ‘const Foam::Time&’
/home/kckincaid/foam/foam-extend-3.2/src/meshTools/lnInclude/cellSet.H:110:13: note: candidate: Foam::cellSet::cellSet(const Foam::Time&, const Foam::word&, Foam::IOobject::readOption, Foam::IOobject::writeOption)
             cellSet
             ^
/home/kckincaid/foam/foam-extend-3.2/src/meshTools/lnInclude/cellSet.H:110:13: note:   no known conversion for argument 1 from ‘Foam::polyMesh’ to ‘const Foam::Time&’
/home/kckincaid/foam/foam-extend-3.2/src/meshTools/lnInclude/cellSet.H:98:9: note: candidate: Foam::cellSet::cellSet(const Foam::polyMesh&, const Foam::word&, const labelHashSet&, Foam::IOobject::writeOption)
         cellSet
         ^
/home/kckincaid/foam/foam-extend-3.2/src/meshTools/lnInclude/cellSet.H:98:9: note:   no known conversion for argument 3 from ‘Foam::DynamicList<int>’ to ‘const labelHashSet& {aka const Foam::HashSet<int, Foam::Hash<int> >&}’
/home/kckincaid/foam/foam-extend-3.2/src/meshTools/lnInclude/cellSet.H:89:9: note: candidate: Foam::cellSet::cellSet(const Foam::polyMesh&, const Foam::word&, const Foam::topoSet&, Foam::IOobject::writeOption)
         cellSet
         ^
/home/kckincaid/foam/foam-extend-3.2/src/meshTools/lnInclude/cellSet.H:89:9: note:   no known conversion for argument 3 from ‘Foam::DynamicList<int>’ to ‘const Foam::topoSet&’
/home/kckincaid/foam/foam-extend-3.2/src/meshTools/lnInclude/cellSet.H:80:9: note: candidate: Foam::cellSet::cellSet(const Foam::polyMesh&, const Foam::word&, Foam::label, Foam::IOobject::writeOption)
         cellSet
         ^
/home/kckincaid/foam/foam-extend-3.2/src/meshTools/lnInclude/cellSet.H:80:9: note:   no known conversion for argument 3 from ‘Foam::DynamicList<int>’ to ‘Foam::label {aka int}’
/home/kckincaid/foam/foam-extend-3.2/src/meshTools/lnInclude/cellSet.H:71:9: note: candidate: Foam::cellSet::cellSet(const Foam::polyMesh&, const Foam::word&, Foam::IOobject::readOption, Foam::IOobject::writeOption)
         cellSet
         ^
/home/kckincaid/foam/foam-extend-3.2/src/meshTools/lnInclude/cellSet.H:71:9: note:   no known conversion for argument 3 from ‘Foam::DynamicList<int>’ to ‘Foam::IOobject::readOption’
/home/kckincaid/foam/foam-extend-3.2/src/meshTools/lnInclude/cellSet.H:68:9: note: candidate: Foam::cellSet::cellSet(const Foam::IOobject&)
         cellSet(const IOobject& obj);
         ^
/home/kckincaid/foam/foam-extend-3.2/src/meshTools/lnInclude/cellSet.H:68:9: note:   candidate expects 1 argument, 3 provided
/home/kckincaid/foam/foam-extend-3.2/src/meshTools/lnInclude/cellSet.H:56:9: note: candidate: Foam::cellSet::cellSet(const Foam::cellSet&)
         cellSet(const cellSet&);
         ^
/home/kckincaid/foam/foam-extend-3.2/src/meshTools/lnInclude/cellSet.H:56:9: note:   candidate expects 1 argument, 3 provided
blockMeshApp.dep:343: recipe for target 'Make/linux64GccDPOpt/blockMeshApp.o' failed
make: *** [Make/linux64GccDPOpt/blockMeshApp.o] Error 1
And I am not sure what to do next. Any advice would be wonderful!

Thanks,
Kellis
Kellis is offline   Reply With Quote

Old   January 12, 2019, 07:24
Default
  #91
Senior Member
 
Przemek
Join Date: Jun 2011
Posts: 231
Rep Power: 12
gaza is on a distinguished road
Hi

I tried to compile blockMeshDG on OFv1612
but I got this error:
Code:
blockMeshApp.C: In function ‘int main(int, char**)’:
blockMeshApp.C:153:25: error: ‘class Foam::IOobject’ has no member named ‘headerOk’
     if (!meshDictIoPtr->headerOk())

Does anybody know how to fix it?
__________________
best regards
pblasiak
gaza is offline   Reply With Quote

Old   January 12, 2019, 08:50
Default
  #92
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,956
Blog Entries: 45
Rep Power: 122
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by gaza View Post
I tried to compile blockMeshDG on OFv1612
Quick answer: blockMesh in v1612 already has multi-grading capabilities: https://openfoamwiki.net/index.php/B...-graded_meshes - therefore it's no longer necessary to use blockMeshDG with v1612.
gaza likes this.
__________________
wyldckat is offline   Reply With Quote

Old   January 12, 2019, 09:00
Default
  #93
Senior Member
 
Przemek
Join Date: Jun 2011
Posts: 231
Rep Power: 12
gaza is on a distinguished road
Hi Bruno,
Thank you for quick reply and solution.


By the way my question about the error
Code:
‘class Foam::IOobject’ has no member named ‘headerOk’
is still worth to find the solution because this problem frequently occurs

when one wants to move something from older OF versions to the newer ones.
__________________
best regards
pblasiak
gaza is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
fvOptions npatricia OpenFOAM 6 May 23, 2018 05:21
CFD by anderson, chp 10.... supersonic flow over flat plate varunjain89 Main CFD Forum 18 May 11, 2018 07:31
Warning message C4133 while compiling Arminius Fluent UDF and Scheme Programming 0 October 2, 2017 11:44
Missing math.h header Travis FLUENT 4 January 15, 2009 11:48
REAL GAS UDF brian FLUENT 6 September 11, 2006 08:23


All times are GMT -4. The time now is 17:30.