CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Error when using decomposePar (https://www.cfd-online.com/Forums/openfoam-pre-processing/226398-error-when-using-decomposepar.html)

metaaron April 26, 2020 08:06

Error when using decomposePar
 
Hi everyone, it's my first post so do let me know if it's in the wrong place or any changes to the formatting I should bear in mind.

I'm trying to set up a model for unsteady flow, everything worked fine in my first attempt with a constant inlet flow rate. I have the flow rates I want to use as an excel file and have been trying to get openfoam to read them as my inlet. I've tried using .csv and .txt files.

Right now I'm getting an error
"incorrect first token, expected <int> or '(', found on line 1 the word '▒▒('

file: /home/XXXX/InFlowRateTable2.txt at line 1."

when trying to use decomposePar.

My U file looks like this:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
Inlet
{
type uniformFixedValue;
uniformValue
{
type tableFile;
file "/home/XXXX/InFlowRateTable2.txt";
}
}
}


Outlet
{
type inletOutlet;
phi phi;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}

Wall
{
type noSlip;
}

}

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

and the txt file with the data looks like this:

(
( 0 542.4027324 )
( 0.001 539.4970665 )
( 0.002 536.6116679 )
( 0.003 533.7468358 )
( 0.004 530.9028481 )
( 0.005 528.0799617 )
( 0.006 525.2784123 )
( 0.007 522.4984148 )
( 0.008 519.7401626 )
( 0.009 517.0038283 )
( 0.01 514.2895634 )
( 0.011 511.5974985 )
( 0.012 508.927743 )
( 0.013 506.2803858 )
( 0.014 503.6554947 )
( 0.015 501.0531172 )
.
.
.
);

There are 6001 lines in the txt file so I won't post it all :D

Any ideas someone has would be very helpful, thanks!


All times are GMT -4. The time now is 08:59.