CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Flow simulation in wind tunnel (https://www.cfd-online.com/Forums/openfoam/123322-flow-simulation-wind-tunnel.html)

mukut September 10, 2013 03:01

Flow simulation in wind tunnel
 
I want to simulate flow inside a wind tunnel which is enhanced by VG. Which openFoam library cases is gapplicable for me? Is there any list of openFoam library cases so that I can easily figure out the appropriate solver for my simulation?

jhoepken September 10, 2013 03:30

I suppose that you haven't had at least a brief look at the list of available solvers, right?

http://www.openfoam.org/docs/user/st...p#x13-890003.5

mukut September 10, 2013 03:52

Thanks for your reply. I am a new user of openFoam. I have checked the list of standard solver already. It states the name of solver only but I am looking for a tutorial (if any) which simulates the flow inside a wind tunnel. Would you please help me in this regard?

mukut September 10, 2013 04:02

I have run "motorbike" tutorial, but where is the motorbike inside the tunnel? Possibly I can use this for my purpose.

jhoepken September 10, 2013 04:35

I would stick to the usual CFD workflow: First choose a mathematical model that represents the physics properly (compressible/incompressible, laminar/turbulent, transient/unsteady, etc.) and select a solver accordingly.
After the selection of the solver, have a look at the tutorials for the solver and reuse them for your purposes. My guess is that you will go with something like simpleFoam or pimpleFoam, but I rarely do single phase flows.

And before you start with anything else, skim over the relevant parts of the user guide.

mukut September 10, 2013 04:50

Quote:

Originally Posted by jhoepken (Post 450855)
I would stick to the usual CFD workflow: First choose a mathematical model that represents the physics properly (compressible/incompressible, laminar/turbulent, transient/unsteady, etc.) and select a solver accordingly.
After the selection of the solver, have a look at the tutorials for the solver and reuse them for your purposes. My guess is that you will go with something like simpleFoam or pimpleFoam, but I rarely do single phase flows.

And before you start with anything else, skim over the relevant parts of the user guide.

Thanks for your every reply. I am using simpleFoam and it's given tutorial named as "motorbike". I ran blockMeash, simpleFoam and paraFoam, it's working. But problem is where is the motorbike inside the tunnel????? I think this tutorial simulate flow around a motorbike, so there should be a motorbike inside the tunnel, I am sorry if I was wrong.

Another question: How can I view each patch in paraFoam?

jhoepken September 10, 2013 05:16

I suppose that you used the Allrun script, that is provided alongside with the motorbike tutorial? If you have a look at it, you'll see that snappyHexMesh is executed in parallel and hence the constant/polyMesh directory does not store the actual mesh. This is done by the processor* directories, that store the decomposed mesh.

Inspecting each patch separately in paraFoam can be done by selecting each particular patch in the lower left corner.

Please consider reading the user's guide, this explains a lot of the stuff you are dealing with at the moment.

mukut September 10, 2013 05:31

Quote:

Originally Posted by jhoepken (Post 450867)
I suppose that you used the Allrun script, that is provided alongside with the motorbike tutorial? If you have a look at it, you'll see that snappyHexMesh is executed in parallel and hence the constant/polyMesh directory does not store the actual mesh. This is done by the processor* directories, that store the decomposed mesh.

Inspecting each patch separately in paraFoam can be done by selecting each particular patch in the lower left corner.

Please consider reading the user's guide, this explains a lot of the stuff you are dealing with at the moment.


Thanks again. It is quite hard to get answer of all of my findings from user manual, but experts like you and others can easily figure my points out. I am sorry if I bother you. But every of your reply helps me to learn quickly.

How is the sequence of running Allrun? like blockMeash>Allrun>simpleFoam>paraFoam?

mukut September 10, 2013 06:56

1 Attachment(s)
Finally I found the way about how to run allrun. after that I excute paraFoam but in terminal it showed following error:

QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
X Error: BadMatch (invalid parameter attributes) 8
Extension: 154 (Uknown extension)
Minor opcode: 11 (Unknown request)
Resource id: 0x3800066

and also output message:

p, li { white-space: pre-wrap; } QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
QVariantMap DBusMenuExporterDBus::getProperties(int, const QStringList&) const: Condition failed: action
X Error: BadMatch (invalid parameter attributes) 8
Extension: 154 (Uknown extension)
Minor opcode: 11 (Unknown request)
Resource id: 0x3800066


what's the problem?

Attachment 25265

mukut September 10, 2013 07:23

I want to modify motorbike tutorial for my wind tunnel flow simulation. So, in order to remove bike geometry what should I do? If I don't run the Allrun script, is it enough? or some more modification is necessary so that bike is removed from domain?

jhoepken September 10, 2013 07:26

Quote:

Originally Posted by mukut (Post 450872)
Thanks again. It is quite hard to get answer of all of my findings from user manual, but experts like you and others can easily figure my points out. I am sorry if I bother you. But every of your reply helps me to learn quickly.

How is the sequence of running Allrun? like blockMeash>Allrun>simpleFoam>paraFoam?

Just have a look at the script. Open it with an editor and just have a look.

mukut September 10, 2013 07:31

Quote:

Originally Posted by jhoepken (Post 450900)
Just have a look at the script. Open it with an editor and just have a look.

here it is:>>>>

#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory

# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

# copy motorbike surface from resources folder
cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/
runApplication surfaceFeatureExtract

runApplication blockMesh

runApplication decomposePar
runParallel snappyHexMesh 6 -overwrite

#- For non-parallel running
#cp -r 0.org 0 > /dev/null 2>&1

#- For parallel running
ls -d processor* | xargs -i rm -rf ./{}/0 $1
ls -d processor* | xargs -i cp -r 0.org ./{}/0 $1

runParallel patchSummary 6
runParallel potentialFoam 6 -noFunctionObjects -writep
runParallel $(getApplication) 6

runApplication reconstructParMesh -constant
runApplication reconstructPar -latestTime

# ----------------------------------------------------------------- end-of-file

Allrun script executed without any problem, but error message appeared when paraFoam is executed

jhoepken September 10, 2013 07:31

Quote:

Originally Posted by mukut (Post 450899)
I want to modify motorbike tutorial for my wind tunnel flow simulation. So, in order to remove bike geometry what should I do? If I don't run the Allrun script, is it enough? or some more modification is necessary so that bike is removed from domain?

From what you are writing, I assume that you don't have any significant knowledge of how a shell and shell scripts work. If you don't run the Allrun script, nothing happens. Period. It is a collection of Linux commands, that are executed in a predefined way. Running the case manually should work with blockMesh -> snappyHexMesh -> simpleFoam

You have to wrap your head around the fact that it is highly unlikely that you will be able to define, setup and run your desired case properly, without practicing:
  1. Linux
  2. Shell scripting
  3. Meshing using blockMesh and snappyHexMesh
  4. Running solvers from the command line

Just follow some tutorials and try to change them. There is nothing anybody can help you with, as you have to learn how things work in OF.

As for Allrun:
I have the script in my OF release as well and had a look at it ;). I cannot tell why paraFoam does not work. Maybe something with your X.

mukut September 10, 2013 07:34

Quote:

Originally Posted by jhoepken (Post 450903)
From what you are writing, I assume that you don't have any significant knowledge of how a shell and shell scripts work. If you don't run the Allrun script, nothing happens. Period. It is a collection of Linux commands, that are executed in a predefined way. Running the case manually should work with blockMesh -> snappyHexMesh -> simpleFoam

You have to wrap your head around the fact that it is highly unlikely that you will be able to define, setup and run your desired case properly, without practicing:
  1. Linux
  2. Shell scripting
  3. Meshing using blockMesh and snappyHexMesh
  4. Running solvers from the command line

Just follow some tutorials and try to change them. There is nothing anybody can help you with, as you have to learn how things work in OF.

As for Allrun:
I have the script in my OF release as well and had a look at it ;). I cannot tell why paraFoam does not work. Maybe something with your X.

True to say I am also a new user of open source OS. I am using Ubuntu for the first time to use openFoam.

For other tutorial cases like cavity, cavityfine etc, paraFoam is working.

gregjunqua September 11, 2013 22:29

You should explore the different folder
0/
system/
constant/

you can start by
system/controlDict where you define everything of your simulation
0/ for know the boundary condition.

Depending what you wanna do you can also install
swak4foam
It s a good tool for dealing with boundary,
you could also use pyFoam how is actually a good tool for checking your boundary condition, cloning your cases, follow your run, to check the iteration, which parameter going crazy or if your simulation is not converging.
It can save a lot of time!
But as say before, openFoam is quiet complex, me after 2 years I still learn new things, so follow some tutorial, search some exemple do the same change the parameters and good luck ;).

mukut September 11, 2013 22:43

Quote:

Originally Posted by gregjunqua (Post 451244)
You should explore the different folder
0/
system/
constant/

you can start by
system/controlDict where you define everything of your simulation
0/ for know the boundary condition.

Depending what you wanna do you can also install
swak4foam
It s a good tool for dealing with boundary,
you could also use pyFoam how is actually a good tool for checking your boundary condition, cloning your cases, follow your run, to check the iteration, which parameter going crazy or if your simulation is not converging.
It can save a lot of time!
But as say before, openFoam is quiet complex, me after 2 years I still learn new things, so follow some tutorial, search some exemple do the same change the parameters and good luck ;).

Thanks for your reply. As a new user of openFoam sometime it is difficult to find the answer from usermanual quickly, that's why I am here to take support from all of you.


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