CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.com] can't use #calc functions after installation W10

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 23, 2020, 14:00
Unhappy can't use #calc functions after installation W10
  #1
Member
 
Franco
Join Date: Nov 2019
Location: Compičgne, France
Posts: 73
Rep Power: 2
otaolafr is on a distinguished road
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)
        );
	}
);
well with some help, i found the solution! i leave the post for anyone else that has this issue:
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 03:35. Reason: solve the issue...
otaolafr is offline   Reply With Quote

Reply

Tags
blockmesh, openfoam instalation

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
[SOWFA] SOWFA installation OpenFOAM 2.4.x OpenFAST mörli OpenFOAM Community Contributions 6 July 29, 2020 12:48
Objective functions khavart SU2 Shape Design 3 June 11, 2019 07:01
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 18:56
Installation problems shellbell1999 OpenFOAM Installation 9 April 6, 2006 13:29
N-S equations:divergence free functions? D. Puigjaner Main CFD Forum 1 July 27, 2000 12:43


All times are GMT -4. The time now is 04:47.