|
[Sponsors] |
![]() |
![]() |
#1 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 ![]() |
Hi all,
I am trying to run the airfoil case of Sebastiano Stipa using OpenFOAM v10, however when I run blockMesh I get an error related with the macro expansion: Code:
Creating block mesh from "system/blockMeshDict" --> FOAM FATAL IO ERROR: Illegal dictionary entry or environment variable name ":aerofoil.xUpper" Valid dictionary entries are 1(type) I have run blockMesh successfully with OpenFOAM v7 so I suppose that something has changed on the Macro expansion declaration but it is not clear the new formulation. Has someone found a solution or walkaround to this problem? Regards Agustín |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Kasper
Join Date: Sep 2017
Posts: 9
Rep Power: 9 ![]() |
Take a look at the documentation for OF10 and you can see the difference :-)
https://doc.cfd.direct/openfoam/user...17-1320004.2.9 |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 ![]() |
Well, that is actually the bug I linked in the first post. It is said that there are mistakes on the macro definition.
If you check in the OF v7 documentation the same section, you will see that the sole difference is the 'slash' introduction in OF v10, and after that the 'dot' formulation is always applied. If the contents of the Macro Expansion are mostly, why can't I run it properly? If there are changes, they are not correctly indicated in the documentation. |
|
![]() |
![]() |
![]() |
![]() |
#4 |
New Member
Juan Pablo Carbajal
Join Date: Jun 2021
Posts: 23
Rep Power: 5 ![]() |
I can confirm this. I have a set of parametrized files and they are not working anymore in OF10.
It seems that there is an undocumented change in the macro expansion. Anybody knows what is this change? Also the "/" (dot) in the documentation is also a bug. It is a dot or a slash? In OF10 it seems it is a slash https://bugs.openfoam.org/view.php?id=3877. Update: Form that bug: the dot notation is deprecated (not working in OF10). Looking at the source code:https://cpp.openfoam.org/v10/diction...ce.html#l00897 I found that for the slash notation (what you need to use in OF10) the references to other levels also change (undocumented). so root level for slash notation is "!" not ":". I cannot find whether the relative scopes (use of "..") are valid for the slash notation, it is not transparent from the source code. Last edited by kakila; November 21, 2022 at 05:41. Reason: found a workaround |
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
Timo Niemi
Join Date: Jun 2015
Posts: 5
Rep Power: 11 ![]() |
The new slash syntax is documented in this commit message: https://github.com/OpenFOAM/OpenFOAM...3519b0d187e485
The documentation for OF10 is not yet fully updated and a bit confusing. The reason for this change was to add flexibility and eg. support easily referring to entries which contain a dot (typical for multiphase simulations). It is still possible revert to using the old syntax, either globally by editing etc/controlDict or locally case by case. |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 ![]() |
Thank you! I have been busy with other bussiness but I have checked your comment and it works!
|
|
![]() |
![]() |
![]() |
![]() |
#7 |
New Member
Join Date: Dec 2019
Posts: 6
Rep Power: 7 ![]() |
||
![]() |
![]() |
![]() |
![]() |
#8 |
New Member
Timo Niemi
Join Date: Jun 2015
Posts: 5
Rep Power: 11 ![]() |
I have not run the case, but I just checked and basically to run blockMesh, do the following changes:
$: -> $! domain. -> domain/ aerofoil. -> aerofoil/ So for example $:aerofoil.xUpper -> $!aerofoil/xUpper and a bit longer snippet: geometry { aerofoil { type triSurfaceMesh; file "NACA0012.obj"; } cylinder { type searchableCylinder; point1 ($!aerofoil/xUpper -1e3 0); point2 ($!aerofoil/xUpper 1e3 0); radius $!domain/zMax; } } vertices ( project ($aerofoil/xLower -0.1 $domain/zMin) (cylinder) ($aerofoil/xTrail -0.1 $domain/zMin) ($domain/xMax -0.1 $domain/zMin) |
|
![]() |
![]() |
![]() |
![]() |
#9 |
New Member
Join Date: Dec 2019
Posts: 6
Rep Power: 7 ![]() |
thanks a lot, it works for blockeMesh, noting that the there other syntax errors for version s OF9 and OF10 included in the mentioned tutorials due to syntax changes, such as functions part in controlDict file, I will try generate the entire tutorial and make updates.
|
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Frequently Asked Questions about Installing OpenFOAM | wyldckat | OpenFOAM Installation | 3 | November 14, 2023 12:58 |
How to contribute to the community of OpenFOAM users and to the OpenFOAM technology | wyldckat | OpenFOAM | 17 | November 10, 2017 16:54 |
OpenFOAM Training Beijing 22-26 Aug 2016 | cfd.direct | OpenFOAM Announcements from Other Sources | 0 | May 3, 2016 05:57 |
Modifying CFD-Post macro to output a time-varying expression at every timestep | lynnathere | CFX | 0 | December 28, 2015 16:19 |
Superlinear speedup in OpenFOAM 13 | msrinath80 | OpenFOAM Running, Solving & CFD | 18 | March 3, 2015 06:36 |