I would like to read in a table from an ASCII file (two columns, space-separated). Peter's suggestion works but -- in my case -- only for boundary conditions. If I replace
Heat Conductivity = Variable Temperature
Real
include hc.dat
End
I get the error message "ERROR:: SectionContents: Problem reading real keyword: heat conductivity: include hc.dat"
The .dat file is located in the same directory as the .sif file. Elmer version is 8.2. Can somebody help me please?
@Peter
Yes, that would be great. Also, I couldn't find any information about the include command except here in this forum.
@Anil
The hc.dat file isn't the problem actually, but the way you create line indents in your sif file. The line(s) with the include command must not contain tabs. I've attached the complete test project; material data is unrealistic for demonstration purpose.
I have the same problem asTom but I could not fix it. I tried wit Tom's file and still i am getting the same error
ERROR:: SectionContents: Problem reading real keyword: heat source: include test.txt
I would not really expect it, but could it be a \CR\LF vs. \LF problem?
Your test.txt contains \CR\LF at the line ends, Tom's dat file only \LF.
If really this is the case, this should be fixed IMHO since nobody expects a parser to have a problem with that, these days...
Body Force 1
Name = "HeatIn"
Heat Source = Variable Time;real;
include test.txt
End
Didn't look at the parser in detail but my guess is that the recursive call to continue reading from an other file assumes that the include statement is an a clean line. Not optimal, I agree.
If you use the GUI you can pres "Enter" to launch an edit window where the multiline values can be edited. Genereally semicolon is indeed intepreted as an alternative to newline.