|
[Sponsors] |
[OpenFOAM] uniformFixedValue with a table -> paraview doesn't show the field |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 9, 2014, 13:06 |
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 |
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)) ); Code:
Error reading line 55 of /case/0/U: Expected a number, found ( 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 |
|
April 10, 2014, 09:50 |
|
#2 |
Member
Nicklas Linder
Join Date: Jul 2012
Location: Germany
Posts: 35
Rep Power: 14 |
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" {} \; Greetings |
|
April 10, 2014, 16:52 |
|
#3 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings Nicklas,
I'll quote myself from almost a year... er, 7 months ago: Quote:
Bruno
__________________
|
||
June 10, 2014, 19:53 |
|
#4 |
New Member
yves candau
Join Date: May 2014
Posts: 4
Rep Power: 12 |
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} 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 |
|
June 15, 2014, 11:53 |
|
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
|
July 16, 2014, 18:24 |
|
#7 |
New Member
yves candau
Join Date: May 2014
Posts: 4
Rep Power: 12 |
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 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. |
|
November 19, 2014, 07:39 |
|
#8 |
New Member
Michael
Join Date: Dec 2011
Location: Geneva
Posts: 28
Rep Power: 14 |
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 |
|
September 8, 2015, 05:36 |
Doubt In the sed command to Solve the Problem in Paraview
|
#9 |
New Member
Rodrigo
Join Date: Jul 2015
Posts: 18
Rep Power: 11 |
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 |
|
October 15, 2015, 08:33 |
uniformFixedValue BC not read by praview
|
#11 |
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18 |
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 |
|
|
|
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 |