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

chtMultiRegionFoam Tutorial

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 8, 2010, 12:21
Default chtMultiRegionFoam Tutorial
  #1
Member
 
Join Date: Jun 2010
Posts: 31
Rep Power: 16
m.nichols19 is on a distinguished road
While attempting the multiRegionHeater chtMultiRegionFoam tutorial I encountered an error that I cannot resolve.

After running the Allrun file, the log.changeDictionary.bottomAir file displays the following:
Quote:
Create time

Create mesh bottomAir for time = 0



Cannot find file "points" in directory "constant/bottomAir/polyMesh"

From function Time::findInstance(const fileName&, const word&, const IOobject::readOption)
in file db/Time/findInstance.C at line 148.

FOAM exiting
Any help would be greatly appreciated.
m.nichols19 is offline   Reply With Quote

Old   June 8, 2010, 17:23
Default
  #2
Member
 
Join Date: Jun 2010
Posts: 31
Rep Power: 16
m.nichols19 is on a distinguished road
I solved the error by replacing line 18 of the Allrun script:

Quote:
changeDictionary -region $i >& log.changeDictionary.$i
should be replaced with

Quote:
changeDictionary -region $i > log.changeDictionary.$i 2>&1
I hope that helps if you encounter the same problem.

Now I have a new dilemma. The various volume fields will not show up in ParaView. Suggestions?
m.nichols19 is offline   Reply With Quote

Old   June 8, 2010, 18:14
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
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 Matt,

Quick solution: on the first line of the Allrun script, change "/bin/sh" to "/bin/bash".

Long explanation - The problem you are facing is quite simple: all of the tutorial scripts use "/bin/sh", but in each Linux distro, sh is linked to bash, dash, ash, ksh or any other shell. But unfortunately, the Linux distro where the tutorials were prepared, sh points to bash, thus the scripts respect mostly the bash syntax, while other systems that use another shell can't handle that same syntax; e.g.: Ubuntu that has dash as default sh.

If you want to change all tutorial scripts to use bash instead of sh, you can run this code in a terminal with OpenFOAM environment activated:
Quote:
Originally Posted by http://code.google.com/p/openfoam-ubuntu/
Code:
cd $FOAM_TUTORIALS
find $FOAM_TUTORIALS/ -name "All*" | \
while read file
do
    mv "$file" "$file.old"
    sed '/^#!/ s/\/bin\/sh/\/bin\/bash/' "$file.old" > "$file"
    rm -f "$file.old"
done
echo "Fix up bash done"
Best regards,
Bruno
stamufa likes this.
__________________
wyldckat is offline   Reply With Quote

Old   June 9, 2010, 11:10
Default
  #4
Member
 
Join Date: Jun 2010
Posts: 31
Rep Power: 16
m.nichols19 is on a distinguished road
Thank you for your reply, Bruno

I am still having the same problem. The solver - chtMultiRegionHeater - runs, but when I try to view the volume fields in ParaView they disappear after the initial time.
m.nichols19 is offline   Reply With Quote

Old   June 9, 2010, 14:54
Default
  #5
Member
 
Join Date: Jun 2010
Posts: 31
Rep Power: 16
m.nichols19 is on a distinguished road
I figured it out. Hooray.
m.nichols19 is offline   Reply With Quote

Old   June 10, 2010, 05:07
Default
  #6
Member
 
toto
Join Date: Jun 2009
Posts: 71
Rep Power: 17
ronaldo is on a distinguished road
use foamTovtk to view the result
ronaldo is offline   Reply With Quote

Old   June 11, 2010, 04:35
Default
  #7
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
I have the same problem that m.nichols19. I use OpenFOAM 1.6 and I don't have the foamTovtk application. Is it normal ?
Cyp is offline   Reply With Quote

Old   June 11, 2010, 17:18
Default
  #8
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
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 Cyp,
Quote:
Originally Posted by Cyp View Post
I have the same problem that m.nichols19. I use OpenFOAM 1.6 and I don't have the foamTovtk application. Is it normal ?
The correct name is foamToVTK. Linux is case sensitive by default, so if you miss just one character's case, it's an invalid command

As for not seeing the fields:
  1. can you see the fields in the cavity tutorial? You know, the first one from the user guide?
  2. how are you running the chtMultiRegionFoam case tutorial? Are you using the Allrun inside the case folder script? Does it create 5 files with the named regions and do they end with ".OpenFOAM"?
If the answer is no for the first point, then follow the instructions from this post: ParaView Stopped Working post #4

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   June 12, 2010, 04:55
Default
  #9
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
Hi wyldckat, thank you for your answer.

Indeed, I have the foamToVTK application. When I run it,

Code:
cyp@cyp-laptop:~/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater$ foamToVTK
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.6                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 1.6-f802ff2d6c5a
Exec   : foamToVTK
Date   : Jun 12 2010
Time   : 10:43:46
Host   : cyp-laptop
PID    : 1766
Case   : /home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Deleting old VTK files in "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK"

Time: 0
    volScalarFields            : K rho p cp k T epsilon
    volVectorFields            : U

    Internal  : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/multiRegionHeater_0.vtk"
    Original cells:3000 points:3751   Additional cells:0  additional points:0

    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/maxY/maxY_0.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/minX/minX_0.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/maxX/maxX_0.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/minY/minY_0.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/minZ/minZ_0.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/maxZ/maxZ_0.vtk"
Time: 0.001

    Internal  : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/multiRegionHeater_1.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/maxY/maxY_1.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/minX/minX_1.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/maxX/maxX_1.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/minY/minY_1.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/minZ/minZ_1.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/maxZ/maxZ_1.vtk"
Time: 50.001

    Internal  : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/multiRegionHeater_2176.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/maxY/maxY_2176.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/minX/minX_2176.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/maxX/maxX_2176.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/minY/minY_2176.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/minZ/minZ_2176.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/maxZ/maxZ_2176.vtk"
Time: 100.001

    Internal  : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/multiRegionHeater_4417.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/maxY/maxY_4417.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/minX/minX_4417.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/maxX/maxX_4417.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/minY/minY_4417.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/minZ/minZ_4417.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/maxZ/maxZ_4417.vtk"
Time: 150.001

    Internal  : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/multiRegionHeater_6591.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/maxY/maxY_6591.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/minX/minX_6591.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/maxX/maxX_6591.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/minY/minY_6591.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/minZ/minZ_6591.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/maxZ/maxZ_6591.vtk"
Time: 200.001

    Internal  : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/multiRegionHeater_8719.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/maxY/maxY_8719.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/minX/minX_8719.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/maxX/maxX_8719.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/minY/minY_8719.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/minZ/minZ_8719.vtk"
    Patch     : "/home/cyp/OpenFOAM/cyp-1.6/run/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/VTK/maxZ/maxZ_8719.vtk"
End
That seems ok. However, then, when I attempt to see my field with paraFoam, as previously, nothing more happens...

paraFoam successfully runs the cavity tutorial case and I have the 5 files you mentioned above:
Code:
multiRegionHeater{bottomAir}.OpenFOAM
multiRegionHeater{heater}.OpenFOAM
multiRegionHeater{leftSolid}.OpenFOAM
multiRegionHeater{rightSolid}.OpenFOAM
multiRegionHeater{topAir}.OpenFOAM
I also noticed that my paraFoam shut down with the following message :

Code:
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::begin: Paint device returned engine == 0, type: 2


Cannot find file "points" in directory "constant/bottomAir/polyMesh"

    From function Time::findInstance(const fileName&, const word&, const IOobject::readOption)
    in file db/Time/findInstance.C at line 148.

FOAM exiting
Regards,
Cyp

PS : I execute the Allrun script

Last edited by Cyp; June 12, 2010 at 05:17.
Cyp is offline   Reply With Quote

Old   September 9, 2010, 09:31
Default Vtk
  #10
Member
 
Join Date: Dec 2009
Posts: 39
Rep Power: 16
marval is on a distinguished road
Hi, everyone!

I don't find the VTK folder in chtMultiRegionSimpleFoam but I do find it in chtMultiRegionFoam. Can I copy this one to the other one? Or is there a huge difference between the two?

Regards
Marco
marval is offline   Reply With Quote

Old   September 9, 2010, 11:14
Default
  #11
Member
 
Join Date: Jun 2010
Posts: 31
Rep Power: 16
m.nichols19 is on a distinguished road
I will need a few more details before I can answer your question, marval. Does running foamToVTK not create the VTK directory in your chtMultiRegionSimpleFoam case directory? Did you run the same case using both chtMultiRegionFoam and chtMultiRegionSimpleFoam?
m.nichols19 is offline   Reply With Quote

Old   September 9, 2010, 11:21
Default
  #12
Member
 
Join Date: Dec 2009
Posts: 39
Rep Power: 16
marval is on a distinguished road
Hmmm, I really don't know how this works but when I use the Allrun script the VTK folder appears.
It doesn't look that I need to use foamToVTK to view my results, do the Allrun script do it? Because I don't see anything in the script though.

I hope I'm not too confusing.

Regards
Marco
marval is offline   Reply With Quote

Old   September 9, 2010, 11:56
Default
  #13
Member
 
Join Date: Jun 2010
Posts: 31
Rep Power: 16
m.nichols19 is on a distinguished road
The VTK directory created by the Allrun script is irrelevant. You will need to run
Code:
foamToVTK -region
for each region.
m.nichols19 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Tutorial for subcooled nucleate boiling Asghari FLUENT 42 December 10, 2018 11:42
Problem on Fluent Tutorial: Horizontal Film Boilig Feng FLUENT 2 April 13, 2013 05:34
STAR-CD Tutorial shekhar aryal STAR-CD 4 March 22, 2010 03:25
Watching the chtMultiRegionFoam tutorial in Paraview anke OpenFOAM 1 March 1, 2010 08:38
Rotor/stator tutorial, and how to... gilberto CFX 5 January 21, 2002 09:41


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