|
[Sponsors] |
August 5, 2009, 23:21 |
Foam::word problem
|
#1 |
New Member
Eric.wang
Join Date: Jun 2009
Location: beijing china
Posts: 11
Rep Power: 16 |
word a = "abc" ;
word b = a +"b"; //no problem word c = b +"'" ; //do have a problem"word::stripInvalid() called for word abcc....",but this had no //problem in OF1.5 |
|
August 6, 2009, 02:40 |
|
#2 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40 |
Quote:
The documentation is not so clear about it, but a "word" should not contain whitespace, quotes (single or double), '/' path separators, ';' end statement or ' {', '}' brace brackets. This has been the same for many versions of OpenFOAM, so you are lucky to have not have problems before. What might be different is your setting of the debug variable for 'word'. If it is zero, the words will not be checked on construction. With 1, they'll be checked and you'll get a warning. With 2 they'll be treated as a fatal error. Thus for your above example (assuming you really want to use a quote inside the word), you really should be using a plain string not a word. |
||
August 6, 2009, 03:01 |
|
#3 |
New Member
Eric.wang
Join Date: Jun 2009
Location: beijing china
Posts: 11
Rep Power: 16 |
thank you ,olesen !
your suggestion is good for me ! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF compiling problem | Wouter | Fluent UDF and Scheme Programming | 6 | June 6, 2012 04:43 |
Incoherent problem table in hollow-fiber spinning | Gianni | FLUENT | 0 | April 5, 2008 10:33 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 06:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 19:13 |
Is this problem well posed? | Thomas P. Abraham | Main CFD Forum | 5 | September 8, 1999 14:52 |