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

Modelling a flow contaning a heat conducting object.

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Yann
  • 1 Post By mikethe1wheelnut

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 7, 2022, 20:38
Default Modelling a flow contaning a heat conducting object.
  #1
Member
 
Michael Jensen
Join Date: May 2022
Posts: 36
Rep Power: 4
mikethe1wheelnut is on a distinguished road
This is a trial shot to see if anybody can offer guidance. Say I want to model the flow of air inside a chimney. Inside this same chimney is a butterfly valve. Say at 45 degrees. So far, fairly simple, just modify the airfoil tutorial. Say though, that the valve is thin, and conducting. Made of aluminum foil for some reason. So that heat from the up-stream side can pass through it and get transmitted to the air on the downstream side. Can openfoam (.org in my case) do this? Would it be easier/better to model it as a solid object (or inflated object?), or as a zero-thickness wall? A wall that prevents molecules from passing through, but transmits heat? (I don't know how to do either of these things -guidance to relevant tutorials is totally appreciated -I'll keep looking in the meantime :-) )


Things that look promissing..:

http://www.tfd.chalmers.se/~hani/kur...eport_Turo.pdf
https://www.youtube.com/watch?v=5z5Jix6tZAk


..looks like chtMultiRegionFoam might be the solution, or part of it..
mikethe1wheelnut is offline   Reply With Quote

Old   June 9, 2022, 04:42
Default
  #2
Member
 
Michael Jensen
Join Date: May 2022
Posts: 36
Rep Power: 4
mikethe1wheelnut is on a distinguished road
Quote:
Originally Posted by mikethe1wheelnut View Post
This is a trial shot to see if anybody can offer guidance. Say I want to model the flow of air inside a chimney. Inside this same chimney is a butterfly valve. Say at 45 degrees. So far, fairly simple, just modify the airfoil tutorial. Say though, that the valve is thin, and conducting. Made of aluminum foil for some reason. So that heat from the up-stream side can pass through it and get transmitted to the air on the downstream side. Can openfoam (.org in my case) do this? Would it be easier/better to model it as a solid object (or inflated object?), or as a zero-thickness wall? A wall that prevents molecules from passing through, but transmits heat? (I don't know how to do either of these things -guidance to relevant tutorials is totally appreciated -I'll keep looking in the meantime :-) )


Things that look promissing..:

http://www.tfd.chalmers.se/~hani/kur...eport_Turo.pdf
https://www.youtube.com/watch?v=5z5Jix6tZAk


..looks like chtMultiRegionFoam might be the solution, or part of it..

I've made it much further through my study now, and technically, I believe the tutorial referenced above can solve the problem. That said, implementing it will be cumbersome, awkward, and limited. I believe there is a better way, combining it with snappyHexMesh (like in the air-foil simulation). I've seen the following referenced in a few places: $FOAM_TUTORIALS/mesh/snappyHexMesh/snappyMultiRegionHeater. However, I don't have it. I suspect it is a tutorial of openform[.com] instead of openfoam[.org]. Is there something equivalent for .org?
mikethe1wheelnut is offline   Reply With Quote

Old   June 9, 2022, 17:55
Default
  #3
Member
 
Michael Jensen
Join Date: May 2022
Posts: 36
Rep Power: 4
mikethe1wheelnut is on a distinguished road
Finally some actual problems. :-)


I've now downloaded openFoam from the .com website and got the directories organized (I think) the way I'm supposed to. Note that I already did this exact same process with openFoam from the .org website, so that might be causing some problems, not sure.


So, here is a list of the errors I'm getting (from running the tutorial /mesh/snappyHexMesh/snappyMultiRegionHeater), extracted from the full terminal output provided at the end. :-)



First problem:

Code:
-decomposeParDict already run on /home/eriadar/OpenFOAM/eriadar-2112/run/tutorials/mesh/snappyHexMesh/snappyMultiRegionHeater: remove log file 'log.-decomposeParDict' to re-run
If you look at the full output below, you will see that, "log.-decomposeParDict" does -not-, in fact, appear to be there, so this error is a mystery. ..perhaps it's in a sub-folder?


Second Problem:


Code:
./Allrun: 24: restore0Dir: not found
Third Problem(s):


Code:
foamListRegions: symbol lookup error: foamListRegions: undefined symbol: _ZN4Foam7argList13argsMandatoryEv
and Fourth Problem ("fatal") -> something to do with enumeration. It doesn't say where all the files are, however, so not trivial to diagnose and solve. ..Indeed, I did a search of the computer for "NamedEnum.C", and it found nothing.. hm.



Full terminal output:



Code:
eriadar@eriadar-Latitude-E7440:~/OpenFOAM/eriadar-2112/run/tutorials/mesh/snappyHexMesh/snappyMultiRegionHeater$ ls
0.orig  Allclean  Allrun  Allrun-parallel  Allrun-serial  constant  system
eriadar@eriadar-Latitude-E7440:~/OpenFOAM/eriadar-2112/run/tutorials/mesh/snappyHexMesh/snappyMultiRegionHeater$ ./Allrun
Running blockMesh on /home/eriadar/OpenFOAM/eriadar-2112/run/tutorials/mesh/snappyHexMesh/snappyMultiRegionHeater
Running surfaceFeatureExtract on /home/eriadar/OpenFOAM/eriadar-2112/run/tutorials/mesh/snappyHexMesh/snappyMultiRegionHeater
Running -decomposeParDict on /home/eriadar/OpenFOAM/eriadar-2112/run/tutorials/mesh/snappyHexMesh/snappyMultiRegionHeater
-decomposeParDict already run on /home/eriadar/OpenFOAM/eriadar-2112/run/tutorials/mesh/snappyHexMesh/snappyMultiRegionHeater: remove log file 'log.-decomposeParDict' to re-run
./Allrun: 24: restore0Dir: not found
-decomposeParDict already run on /home/eriadar/OpenFOAM/eriadar-2112/run/tutorials/mesh/snappyHexMesh/snappyMultiRegionHeater: remove log file 'log.-decomposeParDict' to re-run
foamListRegions: symbol lookup error: foamListRegions: undefined symbol: _ZN4Foam7argList13argsMandatoryEv
foamListRegions: symbol lookup error: foamListRegions: undefined symbol: _ZN4Foam7argList13argsMandatoryEv
foamListRegions: symbol lookup error: foamListRegions: undefined symbol: _ZN4Foam7argList13argsMandatoryEv
Running chtMultiRegionFoam in parallel on /home/eriadar/OpenFOAM/eriadar-2112/run/tutorials/mesh/snappyHexMesh/snappyMultiRegionHeater using 4 processes
foamListRegions: symbol lookup error: foamListRegions: undefined symbol: _ZN4Foam7argList13argsMandatoryEv

Use paraFoam -touch-all to create files for paraview post-processing

eriadar@eriadar-Latitude-E7440:~/OpenFOAM/eriadar-2112/run/tutorials/mesh/snappyHexMesh/snappyMultiRegionHeater$ paraFoam -touch-all
unknown option/argument: '-touch-all'

Usage: paraFoam [OPTION] [PARAVIEW_OPTION]
options:
  -block            use blockMesh reader  (uses .blockMesh extension)
  -builtin          use VTK builtin OpenFOAM reader  (uses .foam extension)
  -case <dir>       specify alternative case directory, default is the cwd
  -empty            launch ParaView without opening any data files
  -region <name>    specify alternative mesh region
  -touch            only create the file  (eg, .blockMesh, .OpenFOAM, etc)
  -touchAll         create .blockMesh, .OpenFOAM files (and for all regions)
  -help             print the usage

paraview options start with a double dashes

* start paraview 5.6.0 with the OpenFOAM libraries

eriadar@eriadar-Latitude-E7440:~/OpenFOAM/eriadar-2112/run/tutorials/mesh/snappyHexMesh/snappyMultiRegionHeater$ paraFoam -touchAll
Created 'snappyMultiRegionHeater.blockMesh'
Created 'snappyMultiRegionHeater.OpenFOAM'
eriadar@eriadar-Latitude-E7440:~/OpenFOAM/eriadar-2112/run/tutorials/mesh/snappyHexMesh/snappyMultiRegionHeater$ paraFoam
I/O    : uncollated


--> FOAM FATAL IO ERROR: 
adjustable is not in enumeration: 
5
(
adjustableRunTime
clockTime
cpuTime
runTime
timeStep
)


file: /home/eriadar/OpenFOAM/eriadar-2112/run/tutorials/mesh/snappyHexMesh/snappyMultiRegionHeater/system/controlDict/writeControl at line 29.

    From function Enum Foam::NamedEnum<Enum, nEnum>::read(Foam::Istream&) const [with Enum = Foam::Time::writeControl; unsigned int nEnum = 5]
    in file lnInclude/NamedEnum.C at line 69.

FOAM exiting
mikethe1wheelnut is offline   Reply With Quote

Old   June 10, 2022, 05:14
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hi Michael,

My best bet would be that you are trying to run a ".com" tutorial with a ".org" openfoam version.

You can check this by typing the command foamVersion in your terminal. It will tell you which version you are currently using.

You can change version with this command:

OpenFOAM-v2112
Code:
source /usr/lib/openfoam/openfoam2112/etc/bashrc
OpenFOAM-9
Code:
source /opt/openfoam9/etc/bashrc
These are examples using the default installation path for ubuntu. You might have to adjust the path if the OpenFOAM repertories are located elsewhere on your system. Basically you need to source the OpenFOAM bashrc file of the version you want to use to load all the environment variables for this version.

You can have as many OpenFOAM versions as you want installed on your system and you can use the source command to switch versions.

In order to load the OpenFOAM environment at login, you can also add the source command in the user's bashrc file located there : /home/username/.bashrc. This is probably what you have done when installing OpenFOAM-9 since this is what is explained in the installation procedure under the "User Configuration" section: https://openfoam.org/download/9-ubuntu/

I hope this helps,
Yann
mikethe1wheelnut likes this.
Yann is offline   Reply With Quote

Old   June 10, 2022, 14:43
Default
  #5
Member
 
Michael Jensen
Join Date: May 2022
Posts: 36
Rep Power: 4
mikethe1wheelnut is on a distinguished road
Quote:
Originally Posted by Yann View Post
Hi Michael,

My best bet would be that you are trying to run a ".com" tutorial with a ".org" openfoam version.

You can check this by typing the command foamVersion in your terminal. It will tell you which version you are currently using.

You can change version with this command:

OpenFOAM-v2112
Code:
source /usr/lib/openfoam/openfoam2112/etc/bashrc
OpenFOAM-9
Code:
source /opt/openfoam9/etc/bashrc
These are examples using the default installation path for ubuntu. You might have to adjust the path if the OpenFOAM repertories are located elsewhere on your system. Basically you need to source the OpenFOAM bashrc file of the version you want to use to load all the environment variables for this version.

You can have as many OpenFOAM versions as you want installed on your system and you can use the source command to switch versions.

In order to load the OpenFOAM environment at login, you can also add the source command in the user's bashrc file located there : /home/username/.bashrc. This is probably what you have done when installing OpenFOAM-9 since this is what is explained in the installation procedure under the "User Configuration" section: https://openfoam.org/download/9-ubuntu/

I hope this helps,
Yann

I expect it will. Clearly, I got some parts of the installation procedure right, but didn't follow -all- the instructions. Specifically, the following: (https://develop.openfoam.com/Develop.../wikis/running)


Code:
Manually

 To manually activate a particular OpenFOAM version, source its corresponding etc/bashrc file:
  $ . /path/to/openfoam/etc/bashrc 
After using the desired OpenFOAM commands, the wmUnset alias can be used to remove it again.
..I've attempted to track down what " . " means (.."run", clearly..), but stopped, concluding I didn't really need to know.


The instructions for a persistent session are similar.



Code:
Manual

 For a persistent OpenFOAM environment, the OpenFOAM bashrc file can be sourced from your ~/.bashrc file by adding a line resembling the following to that file:
  . /path/to/openfoam/etc/bashrc 
It is usually prudent to check the existence of the file prior to sourcing it:
  if [ -f /path/to/openfoam/etc/bashrc ] then  . /path/to/openfoam/etc/bashrc fi
I mention this because those instructions are different from your suggestion of the usage of "source". I take it these are two different ways of achieving the same thing.


I believe what I had done was assume that since I was in the sub-folder of the tutorials of a specific version, that "it" would automatically recognize that fact, and use the correct program. Incorrect, clearly
mikethe1wheelnut is offline   Reply With Quote

Old   June 10, 2022, 15:45
Default
  #6
Member
 
Michael Jensen
Join Date: May 2022
Posts: 36
Rep Power: 4
mikethe1wheelnut is on a distinguished road
Quote:
Originally Posted by Yann View Post
Hi Michael,

My best bet would be that you are trying to run a ".com" tutorial with a ".org" openfoam version.

You can check this by typing the command foamVersion in your terminal. It will tell you which version you are currently using.

You can change version with this command:

OpenFOAM-v2112
Code:
source /usr/lib/openfoam/openfoam2112/etc/bashrc
OpenFOAM-9
Code:
source /opt/openfoam9/etc/bashrc
These are examples using the default installation path for ubuntu. You might have to adjust the path if the OpenFOAM repertories are located elsewhere on your system. Basically you need to source the OpenFOAM bashrc file of the version you want to use to load all the environment variables for this version.

You can have as many OpenFOAM versions as you want installed on your system and you can use the source command to switch versions.

In order to load the OpenFOAM environment at login, you can also add the source command in the user's bashrc file located there : /home/username/.bashrc. This is probably what you have done when installing OpenFOAM-9 since this is what is explained in the installation procedure under the "User Configuration" section: https://openfoam.org/download/9-ubuntu/

I hope this helps,
Yann

Looks like it worked! Many thanks!


However, post-processing gives trouble.. submitting that as a different thread so it's more useful for others.. (Paraview of openfoam 9 not recognized by openfoam-2112)
Yann likes this.
mikethe1wheelnut is offline   Reply With Quote

Reply

Tags
heat diffusion, multi-component, openfoam 9


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
[foam-extend.org] Error compiling OpenFOAM-1.6-ext Canesin OpenFOAM Installation 137 January 20, 2016 15:56
Coursework - Basic questions LBOstudent Phoenics 1 December 18, 2015 06:39
Geothermal Reservoir 2D heat flow modelling phobo ANSYS 0 May 25, 2014 11:10
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 04:23
error message cuteapathy CFX 14 March 20, 2012 07:45


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