CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

the problem regarding boundarydata importing

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 1, 2021, 09:41
Default the problem regarding boundarydata importing
  #1
Senior Member
 
kimy
Join Date: Mar 2019
Location: https://t.me/pump_upp
Posts: 164
Rep Power: 7
qi.yang@polimi.it is on a distinguished road
Send a message via ICQ to qi.yang@polimi.it Send a message via AIM to qi.yang@polimi.it Send a message via Yahoo to qi.yang@polimi.it
Hi guys, I am using OPENFOAM-Extend4.1 and I need to import boundarydata. As shown below, the pressure file is included by using #include command. However, when I run the simulation, the error appearred. Do you have any idea?
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | foam-extend: Open Source CFD                    |
|  \\    /   O peration     | Version:     4.1                                |
|   \\  /    A nd           | Web:         http://www.foam-extend.org         |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       scalarAverageField;
    object      values;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// Average
0

// Data on points
#include "p.data"
Code:
--> FOAM FATAL IO ERROR:
incorrect first token, expected <int> or '(', found on line 21 the word '#include'
and the p.data is as following,
Code:
400
(
97692.8
97769.8
97847.8
97926.4
98005.3
98084.3
98162.8
.....
)
In fact, the simulation can be run successfully if the pressure file reads below.
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | foam-extend: Open Source CFD                    |
|  \\    /   O peration     | Version:     4.1                                |
|   \\  /    A nd           | Web:         http://www.foam-extend.org         |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       scalarAverageField;
    object      values;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// Average
0

// Data on points
400
(
-233.563
-156.563
-78.563
0.037
78.937
157.937
...
)
qi.yang@polimi.it is offline   Reply With Quote

Old   August 1, 2021, 10:25
Default
  #2
Member
 
Petros Ampatzidis
Join Date: Oct 2018
Location: Bath, UK
Posts: 64
Rep Power: 7
petros is on a distinguished road
Hi,

I have experienced this in the past and I don't know why this error occurs. But the question is: why don't you just use the second format, which actually works? At least, this is what I did in the end.

Best,
Petros
petros is offline   Reply With Quote

Old   August 1, 2021, 11:01
Default
  #3
Senior Member
 
kimy
Join Date: Mar 2019
Location: https://t.me/pump_upp
Posts: 164
Rep Power: 7
qi.yang@polimi.it is on a distinguished road
Send a message via ICQ to qi.yang@polimi.it Send a message via AIM to qi.yang@polimi.it Send a message via Yahoo to qi.yang@polimi.it
Quote:
Originally Posted by petros View Post
Hi,

I have experienced this in the past and I don't know why this error occurs. But the question is: why don't you just use the second format, which actually works? At least, this is what I did in the end.

Best,
Petros
Hi Petros,

Yes, the second format definitely works but I need to arrange a lot of files manually, which takes a long time since I don't know if it is possible to use Matlab for writing a script of allowing writing pressure data append a basic empty file with a header.
qi.yang@polimi.it is offline   Reply With Quote

Old   August 4, 2021, 04:47
Default
  #4
Senior Member
 
kimy
Join Date: Mar 2019
Location: https://t.me/pump_upp
Posts: 164
Rep Power: 7
qi.yang@polimi.it is on a distinguished road
Send a message via ICQ to qi.yang@polimi.it Send a message via AIM to qi.yang@polimi.it Send a message via Yahoo to qi.yang@polimi.it
Does anyone have ideas?
qi.yang@polimi.it is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SU2-7.0.1 on ubuntu 18.04 hyunko SU2 Installation 7 March 16, 2020 04:37
Problem with importing parasolid file in GAMBIT samanlak98 Mesh Generation & Pre-Processing 0 June 21, 2019 19:11
"There was a problem importing the mesh..." JohMey CFX 6 February 13, 2018 10:19
Problem in Importing CFX results in Tecplot 360-2012 safikhani_hamed CFX 7 October 12, 2013 06:29
Problem of importing the geometry Dany CFX 4 March 28, 2003 09:49


All times are GMT -4. The time now is 13:37.