CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   wrong token type - expected word (https://www.cfd-online.com/Forums/openfoam-programming-development/242664-wrong-token-type-expected-word.html)

Bana May 4, 2022 06:44

wrong token type - expected word
 
Hello All,

I am facing a weird error! I am using OpenFOAM-Extend 4.1 and I have mixed CavitatingFoam with chtMultiRegionFoam. The solver I developed compiled without any error, then I prepared a case based on the multiRegionHeater tutorial.

While running this case, for the fluid region it does not accept the same entries as it is in the cavitatingFoam and it produces the following error:

PHP Code:

wrong token type expected Scalarfound on line 19 the word 'psiv' 

The following is the entry in thermodynamicProperties file:

PHP Code:

psiv                              psiv       [-2 2 0 0]     2.5e-06

After that to solve it I changed the entry to:

PHP Code:

psiv                              2.5e-06

but this time the following error appears:

PHP Code:

wrong token type expected word found on line 19 the doubleScalar 2.5e-06 

So at first it says that it expects double and when I change it to the double it gets an error that it needs a word!


The part of the code that asks for the entry in my solver is:


PHP Code:

psivFluid.set
(
    
i,
    new 
dimensionedScalar
    
(
        
"psiv",
        
dimensionSet(0,-2,2,0,0,0,0),
        
thermodynamicPropertiesFluid[i].lookup("psiv")
    )
); 


If anybody can give me a hint about the source of this error it will be very much appreciated.

Thanks and regards


All times are GMT -4. The time now is 16:33.