CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] uniformFixedValue with a table -> paraview doesn't show the field

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By lithos
  • 1 Post By fabian_roesler

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 9, 2014, 13:06
Default uniformFixedValue with a table -> paraview doesn't show the field
  #1
Member
 
Nicklas Linder
Join Date: Jul 2012
Location: Germany
Posts: 35
Rep Power: 14
nlinder is on a distinguished road
Hi!

I ran an interFoam case with the velocity BC
Code:
        type            uniformFixedValue;
        uniformValue    table
        (
            (0.0 (0.0 0.0 0.0))
            (1 (1.0 0.0 0.0))
            (3 (4.0 0 0))
        );
Results are as expected. Opening the case, paraview complains
Code:
Error reading line 55 of /case/0/U: Expected a number, found (
which is the line of the first entry of the table. I read, opening it with paraFoam should resolve that issue. However, it does not for me.

Is it possible to either substitute each occurrence of that BC by a fixedValue easily (lots of timesteps)? Or does anyone know another solution? I use OF 2.2.x

Thanks in advance!
Nicklas
nlinder is offline   Reply With Quote

Old   April 10, 2014, 09:50
Default
  #2
Member
 
Nicklas Linder
Join Date: Jul 2012
Location: Germany
Posts: 35
Rep Power: 14
nlinder is on a distinguished road
managed to do it with sed:
Code:
find ./ -name U -type f -exec sed -i "/\(uniformFixedValue\)/{n;N;N;N;N;N;N;N;N;d}" {} \;
find ./ -name U -type f -exec sed -i "s/uniformFixedValue/fixedValue;value uniform (0 0 0)/g" {} \;
and yes - you might can do that in one command. But if anyone has an easier solution I'd be interested.

Greetings
nlinder is offline   Reply With Quote

Old   April 10, 2014, 16:52
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Nicklas,

I'll quote myself from almost a year... er, 7 months ago:
Quote:
Originally Posted by wyldckat View Post
The internal ".foam" reader is allergic to the boundary condition "uniformFixedValue". Therefore, before running paraview, you'll need to run this command:
Code:
sed -i -e "s=uniformFixedValue=fixedValue=g"  [0-9][0-9]*/{U,p,k,nut,epsilon}
It will replace all occurrences of "uniformFixedValue" with "fixedValue", for all of the essential field files in the time folders after "0".

The problem is that you should not use these time folders for continuing the simulation afterwards, since this hack could damage the simulation characteristics for continuing simulating. But it should not damage the results for post-processing.

edit: By the way, the same happens in ParaView 3.12.0.
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   June 10, 2014, 19:53
Default
  #4
New Member
 
yves candau
Join Date: May 2014
Posts: 4
Rep Power: 12
yvesc is on a distinguished road
thanks to you both. I have been trying to experiment with time-varying BC, and I have had the exact same problem; I am reassured that your analysis is the same as mine, it's a "bug" where openFoam files just recopy the uniformFixedValue in its entirety, and paraFoam is unable to read that format. Would be smoother and more logical if each time-file had a fixed value entry with the correct value for that time.

1) should this be reported as a bug? Doesn't just everybody meet this problem and lose time over it?

2) Bruno, your one-liner

Code:
 sed -i -e "s=uniformFixedValue=fixedValue=g"  [0-9][0-9]*/{U,p,k,nut,epsilon}
doesn't work for me:
a - "-i -e" : that has the result of generating "U-e" etc backup files -- maybe that's my version of sed, I'm on Mac OsX
b- "changing "uniformFixedValue" to "fixedValue" is not enough, you have to erase the following lines too (in my case, an inline table), otherwise paraFoam chokes.

I guess this is a job for awk, I will have to brush up on the subject.

Last edited by wyldckat; June 15, 2014 at 09:38. Reason: fixed code markers
yvesc is offline   Reply With Quote

Old   June 15, 2014, 11:53
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Yves,

The problem is with ParaView's internal ".foam" reader. It is not a problem with OpenFOAM's own ".OpenFOAM" reader plug-in for ParaView.

Personally I haven't reported this to the ParaView or VTK bug tracker, as there are several more bugs that need fixing in the internal reader, which may or may not have already been fixed in the latest "vtkPOFFReader": http://openfoamwiki.net/index.php/Co...r_for_ParaView

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   July 10, 2014, 03:11
Default
  #6
Member
 
Francisco T
Join Date: Nov 2011
Location: Melbourne, Australia
Posts: 64
Blog Entries: 1
Rep Power: 15
frantov is on a distinguished road
Hello Yvesc
Did you manage to fix this with awk or something else?
Im experiencing a similar issue and I need to get rid of three tables (three outlets)
regards
Fran
frantov is offline   Reply With Quote

Old   July 16, 2014, 18:24
Default
  #7
New Member
 
yves candau
Join Date: May 2014
Posts: 4
Rep Power: 12
yvesc is on a distinguished road
Hi francisco.
No, I just gave my personal problem a quick SED treatment.


Code:
#!/bin/bash
LC_ALL=C sed -i "" -e "/uniformFixedValue/{n;N;N;N;N;N;N;N;N;d;}" [0-9][0-9]*/Solid2/T
LC_ALL=C sed -i "" -e "s/uniformFixedValue/fixedValue; value uniform 300/g" [0-9][0-9]*/Solid2/T
in my case, the files to modify were T in directories xxxxxx/Solid2 except of course directory 0, hence the first [0-9] in the path.
The first line deletes the lines after uniformFixedValue; the number of N's had to be adapted to the number of lines to be deleted *in my case*.
The second line replaces the remaining "uniformFixedValue" by "fixed value".
The "" after -i was necessary to remove the problem I pointed out in my previous post.

LC_ALL=C was necessary to avoid an "illegal byte sequence" error, my files probably are not UTF8, didn't check.
yvesc is offline   Reply With Quote

Old   November 19, 2014, 07:39
Default
  #8
New Member
 
Michael
Join Date: Dec 2011
Location: Geneva
Posts: 28
Rep Power: 15
lithos is on a distinguished road
Quote:
Originally Posted by yvesc View Post
maybe that's my version of sed, I'm on Mac OsX
Hi,

yes, this is exactly the problem. I would suggest you to install gsed via MacPorts, Fink, or any other source you might want to use. Standard 'sed' by Apple is a weird, limited edition. I had already several problems using linux scripts on Mac due to this. Hope it helps.

Cheers, Michael
wyldckat likes this.
lithos is offline   Reply With Quote

Old   September 8, 2015, 05:36
Default Doubt In the sed command to Solve the Problem in Paraview
  #9
New Member
 
Rodrigo
Join Date: Jul 2015
Posts: 18
Rep Power: 11
Rodrigo Correa is on a distinguished road
Dears,

I'm also facing that problem with Paraview.
I'd like to know what specific thing in the following command posted by Bruno:

sed -i -e "s=uniformFixedValue=fixedValue=g" [0-9][0-9]*/{U,p,k,nut,epsilon}

what does [0-9] [0-9] means?

Best Regards,

Rodrigo Correa
Rodrigo Correa is offline   Reply With Quote

Old   September 9, 2015, 16:58
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by Rodrigo Correa View Post
what does [0-9] [0-9] means?
Quick answer:
wyldckat is offline   Reply With Quote

Old   October 15, 2015, 08:33
Default uniformFixedValue BC not read by praview
  #11
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
Hi,

I gave the uniformFixedValue-with-paraview-problem a bug treatment.
After a short discussion, Henry Weller made the behaviour of uniformFixedValueFvPatchField consistent between OpenFOAM-2.4.x and the latest version in OpenFOAM-dev.

0001867: uniformFixedValue BC not read by praview
http://www.openfoam.org/mantisbt/view.php?id=1867

Cheers

Fabian
wyldckat likes this.
fabian_roesler is offline   Reply With Quote

Old   October 17, 2015, 09:05
Default
  #12
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Fabian,

Many thanks for reporting this! I kept forgetting about looking into this

Best regards,
Bruno
wyldckat 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
[OpenFOAM] Questions about Paraview to show Parallel run of OpenFOAM padian ParaView 20 September 24, 2018 13:52
[General] Paraview: wrong pressure field Emanueledes ParaView 1 December 7, 2017 10:49
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
[General] Paraview Vector Field simone Marras ParaView 2 April 3, 2013 07:34
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51


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