testDictCalc1 1.31 KB
Newer Older
shunbo's avatar
shunbo committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2112                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      dictionary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

calc1 #calc #{    degToRad() *
        constant::mathematical::pi *
        cos(100.0) * mag(19) + 1 * constant::mathematical::pi
            +
        // Skip comments
        constant::mathematical::pi * 15 + hypot(3.0,4.0) #};

calc3   (#calc"hypot(3.0,4.0)", #calc"sqrt(2.0)", #calc"constant::mathematical::pi");

calc4   #calc"$calc1 * 10";

pi()    #calc #{ constant::mathematical::pi #};

sinh(0.1)  #calc #{ sinh(0.1) #};
cosh(0.1)  #calc #{ cosh(0.1) #};

sqrt100    #calc #{((sqrt(100.0)))#};

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //