|
[Sponsors] |
[OpenFOAM.com] can't use #calc functions after installation W10 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 23, 2020, 15:00 |
can't use #calc functions after installation W10
|
#1 |
Senior Member
Franco
Join Date: Nov 2019
Location: Compičgne, France
Posts: 129
Rep Power: 7 |
hello,
new in OpenFOAM i have installed OF in W10 following the guide from József Nagy (guide). i was trying to use a parametric blockMesh, (I am copying the code at the end of the post) where I use #calc in it and I gives me error when using it: I am completly new to linux and from the error, if i understand correctly i have no writes or i have missing files... and dont know how to solve it. if anyone could help i would appreciate it Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } convertToMeters 0.001; //This gives you the scale: 0.001 would mean all units in this file are [mm] / 1 units in the stl [m] xmin 0; xmax 8; ymin 0; ymax 8; zmin 0; zmax 51; deltax 0.1; deltay 0.1; deltaz 0.1; lx #calc "$xmax - $xmin"; ly #calc "$ymax - $ymin"; lz #calc "$zmax - $zmin"; xcells #calc "round( $lx / $deltax )"; ycells #calc "round( $ly / $deltay )"; zcells #calc "round( $lz / $deltaz )"; vertices ( //BLOCK 0 ($xmin $ymin $zmin) //0 ($xmax $ymin $zmin) //1 ($xmax $ymax $zmin) //2 ($xmin $ymax $zmin) //3 ($xmin $ymin $zmax) //4 ($xmax $ymin $zmax) //5 ($xmax $ymax $zmax) //6 ($xmin $ymax $zmax) //7 ); blocks ( hex (0 1 2 3 4 5 6 7) ($xcells $ycells $zcells) simpleGrading (1 1 1) ); edges ( ); boundary ( symmetryPlane_1 //buttom { type symmetryPlane; faces ( (4 5 1 0) ); } symmetryPlane_2 //back { type symmetryPlane; faces ( (7 4 0 3) ); } wall_1 //front { type wall; faces ( (2 1 5 6) ); } wall_2 //top { type wall; faces ( (3 2 6 7) ); } outlet //Right { type patch; faces ( (7 6 5 4) ); } inlet //left { type patch; faces ( (2 3 0 1) ); } ); I installed some things for ubuntu and solved everything: sudo apt-get update -y sudo apt-get install -y make sudo apt-get install build-essential Last edited by otaolafr; April 24, 2020 at 04:35. Reason: solve the issue... |
|
October 21, 2022, 06:20 |
|
#2 |
New Member
Jinghan WANG
Join Date: Mar 2022
Posts: 2
Rep Power: 0 |
I've met the same problem today, and the re-installation of make didn't help.
I solved this issue by using ' #eval{ }; ' expression replacing all the ' #calc " "; ' expressions in blockMeshDict. |
|
October 21, 2022, 06:26 |
|
#3 | |
Senior Member
Franco
Join Date: Nov 2019
Location: Compičgne, France
Posts: 129
Rep Power: 7 |
Quote:
best regards |
||
Tags |
blockmesh, openfoam instalation |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[SOWFA] SOWFA installation OpenFOAM 2.4.x OpenFAST | mörli | OpenFOAM Community Contributions | 6 | July 29, 2020 13:48 |
Objective functions | khavart | SU2 Shape Design | 3 | June 11, 2019 08:01 |
CFX11 + Fortran compiler ? | Mohan | CFX | 20 | March 30, 2011 19:56 |
Installation problems | shellbell1999 | OpenFOAM Installation | 9 | April 6, 2006 14:29 |
N-S equations:divergence free functions? | D. Puigjaner | Main CFD Forum | 1 | July 27, 2000 13:43 |