|
[Sponsors] |
August 20, 2013, 06:42 |
|
#21 | |
Super Moderator
Maxime Perelli
Join Date: Mar 2009
Location: Switzerland
Posts: 3,297
Rep Power: 41 |
Quote:
Thanks for the refresh-session, I need vacation...
__________________
In memory of my friend Hervé: CFD engineer & freerider |
||
August 20, 2013, 06:47 |
|
#22 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21 |
What is in "include/initialConditions"? Any zero-values accidentally? Please check with implementation.
|
|
August 20, 2013, 06:52 |
|
#23 | |
Senior Member
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 12 |
no zero value..
Quote:
|
||
August 20, 2013, 06:54 |
|
#24 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21 |
Where did you define these variable? I assumed they were in this include file?
Uref $Uref; Href $Href; n $windDirection; z $zDirection; z0 $z0; zGround $zGround; |
|
August 20, 2013, 06:55 |
|
#25 | |
Senior Member
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 12 |
Quote:
|
||
November 27, 2013, 20:22 |
|
#26 |
Member
sqing
Join Date: Sep 2012
Location: Dalian
Posts: 77
Rep Power: 13 |
Hi izna,
Have you solved the problem? I‘m trying to do the same case with you and I also find the error: PyFoam.ThirdParty.pyratemp.TemplateSyntaxError: line 2, col 1: invalid syntax (, line 1) If you have made any progress, please tell me. Best regards sunxing |
|
October 27, 2015, 14:27 |
pyfoam, templates, error
|
#27 |
New Member
bernardo
Join Date: Apr 2012
Posts: 2
Rep Power: 0 |
Hello. Newbie on this pyfoam automation thing.
Anybody knows why pyfoam crashes when trying to invoke template.writeToFile? template.writeToFile(bmName,{'z0':z0,'us':us}) gets the following error: Traceback (most recent call last): File "./run_z0.py", line 113, in <module> main(template0, template, orig, target0, withBlock, z0) File "./run_z0.py", line 73, in main template = TemplateFile(bmName+".template") File "/usr/local/lib/python2.7/site-packages/PyFoam/Basics/TemplateFile.py", line 381, in __init__ escape=None File "/usr/local/lib/python2.7/site-packages/PyFoam/ThirdParty/pyratemp.py", line 1190, in __init__ parsetree = p.parse(tmpl) File "/usr/local/lib/python2.7/site-packages/PyFoam/ThirdParty/pyratemp.py", line 547, in parse return self._parse(template) File "/usr/local/lib/python2.7/site-packages/PyFoam/ThirdParty/pyratemp.py", line 755, in _parse self._parse_sub(parsetree, template[curr:], fpos) File "/usr/local/lib/python2.7/site-packages/PyFoam/ThirdParty/pyratemp.py", line 578, in _parse_sub self._testexpr(match.group("sub"), fpos+start) File "/usr/local/lib/python2.7/site-packages/PyFoam/ThirdParty/pyratemp.py", line 560, in _testexpr raise TemplateSyntaxError(err, self._errpos(fpos)) |
|
April 17, 2016, 12:22 |
|
#28 | |
New Member
Join Date: Oct 2014
Posts: 1
Rep Power: 0 |
Quote:
Code:
expressionDelimiter="$" Code:
template = TemplateFile( bmName + ".template",expressionDelimiter="$") I know its too late to post this but I do it to help others having this problem since it was hard to find a solution for me. |
||
February 3, 2017, 13:24 |
|
#29 |
Senior Member
khedar
Join Date: Oct 2016
Posts: 111
Rep Power: 9 |
Thanks ZenCFD for the solution. But how did you locate the error?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
interFoam vs. simpleFoam channel flow comparison | DanM | OpenFOAM Running, Solving & CFD | 12 | January 31, 2020 15:26 |
Laminar simpleFoam and inviscid simpleFoam | herenger | OpenFOAM Running, Solving & CFD | 7 | July 11, 2013 06:27 |
Trying to run a benchmark case with simpleFoam | spsb | OpenFOAM | 3 | February 24, 2012 09:07 |
simpleFoam crash -> How to solve | tH3f0rC3 | OpenFOAM | 4 | May 12, 2011 07:07 |
Naca0012 k-e mpirun gives fpe whereas simpleFoam not | Pierpaolo | OpenFOAM | 1 | May 8, 2010 03:08 |