CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Codestream CodedFixedValue

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 16, 2021, 12:23
Default Codestream CodedFixedValue
  #1
New Member
 
Joaquin Moreno
Join Date: Oct 2020
Posts: 5
Rep Power: 5
joaquinmorenou is on a distinguished road
Hi, I'm trying to set a boundary condition with codedFixedValue and a initial condition with codestream, but I get the following error, any ideas?

Code:
Create time

Create mesh for time = 0


PIMPLE: Operating solver in PISO mode


Reading g

Storing g as gravity
rampTime for gravity set to 0
Reading transportProperties

Using #codeStream at line 20 in file "/home/memoristahid3/3DScour/0/Ua"
Using #codeStream with "/home/memoristahid3/3DScour/dynamicCode/platforms/linux64IccDPInt32Opt/lib/libcodeStream_85adb0af243e46c8b278c81ccd1079c44b5e2eca.so"


--> FOAM FATAL IO ERROR:
word ' [s@...'
    is too long (max. 1024 characters)

file: input at line 2.

    From Foam::Istream &Foam::ISstream::read(Foam::word &)
    in file db/IOstreams/Sstreams/ISstream.C at line 451.

FOAM exiting
Attached Files
File Type: zip Ua.zip (1.8 KB, 9 views)
joaquinmorenou is offline   Reply With Quote

Old   April 17, 2021, 10:00
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,695
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by joaquinmorenou View Post
Hi, I'm trying to set a boundary condition with codedFixedValue and a initial condition with codestream, but I get the following error, any ideas?

Code:
--> FOAM FATAL IO ERROR:
word ' [s@...'
    is too long (max. 1024 characters)

file: input at line 2.

    From Foam::Istream &Foam::ISstream::read(Foam::word &)
    in file db/IOstreams/Sstreams/ISstream.C at line 451.

FOAM exiting
I really don't see why this should be happening. Your code chunk is definitely long, but that is not normally a problem. What I don't understand, is how the ISstream parser is using read(word&) instead of readVerbatim(std::string&).
The readVerbatim method has no limits. It reads into an 8k buffer and then appends that when it gets full.

https://develop.openfoam.com/Develop...94302e411ff4f7

Should be in v1806 and later. Are you using an older version?
olesen is offline   Reply With Quote

Old   April 17, 2021, 11:35
Default
  #3
New Member
 
Joaquin Moreno
Join Date: Oct 2020
Posts: 5
Rep Power: 5
joaquinmorenou is on a distinguished road
Quote:
Originally Posted by olesen View Post
I really don't see why this should be happening. Your code chunk is definitely long, but that is not normally a problem. What I don't understand, is how the ISstream parser is using read(word&) instead of readVerbatim(std::string&).
The readVerbatim method has no limits. It reads into an 8k buffer and then appends that when it gets full.

https://develop.openfoam.com/Develop...94302e411ff4f7

Should be in v1806 and later. Are you using an older version?
I'll check that. Actually I'm using OFv2006
joaquinmorenou is offline   Reply With Quote

Old   April 18, 2021, 05:28
Default
  #4
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,695
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by joaquinmorenou View Post
I'll check that. Actually I'm using OFv2006
In that case, it could be a bug. If your case is smallish, open an issue (https://develop.openfoam.com/Develop...nfoam/-/issues) with the test case to trace what is upsetting the parser.
olesen 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
including parameter file in codedFixedValue Loekatoni OpenFOAM Running, Solving & CFD 4 November 9, 2023 16:56
[OpenFOAM] How to correctly show the result of #codeStream# internalField? chengdi ParaView 24 July 14, 2022 04:26
PROBLEMS DEFINING A LIST USING #CODESTREAM !! Help please !! angatri_14 OpenFOAM Programming & Development 1 August 21, 2020 17:16
How to create the internalField with #codeStream chun OpenFOAM Running, Solving & CFD 3 May 6, 2017 10:35
pipeCyclic tutorial codeStream error in codedFixedValue BC specification fivewood OpenFOAM Running, Solving & CFD 0 January 15, 2014 22:36


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