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

Fan in OpenFOAM 2.3.0

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 23, 2014, 02:35
Default Fan in OpenFOAM 2.3.0
  #1
New Member
 
Join Date: Mar 2014
Posts: 3
Rep Power: 12
Puglin is on a distinguished road
Hi all,

I'm endeavouring to simulate the flow through a duct (with simpleFoam). The duct has a fan pulling air through it, which I'm trying to simulate with a cyclic-type fan. At this stage I'm content with doing so in a 2D context. I used Gmesh to build the duct cross section and extrude it (adding a planar surface to serve as my fan patch).

My first mistake was using a setup for the boundary and 0 files I found in an old tutorial that ceased to be relevant when version 2.0 changed the way you set up cyclic patches; when I went to run the simulation it asked if I wanted to run foamUpgradeCyclics, to automatically convert my files to the new form. I did that, and it altered my boundary file and all the files in 0, saving backups of the old ones. So far so good.

However, when I went to run the simulation, I got a fatal error:
Quote:
Reading field p



--> FOAM FATAL ERROR:

request for surfaceScalarField phi from objectRegistry region0 failed
available objects of type surfaceScalarField are
0()

From function objectRegistry::lookupObject<Type>(const word&) const
in file /home/opencfd/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 198.

FOAM aborting
I endeavoured to access p to see what was wrong, but when I tried to open it with gedit, gedit was unable to detect the character encoding. I have no idea what foamUpgradeCyclics did to this file (all the other ones it edited open just fine); is this normal?

Is there some way I can edit the (thankfully backed up) old p file to reflect the new nature of the cyclic system? This is how the old (obsolete) p looks:

Quote:
dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet
{
type freestreamPressure;
}

exit
{
type freestreamPressure;
}

Fan
{
type fan;
patchType cyclic;
f List<scalar> 2 (10.0 -1.0);
value uniform 0;
}

top
{
type freestreamPressure;
}

bottom
{
type freestreamPressure;
}

ForeDuct
{
type zeroGradient;
}

RearDuct
{
type zeroGradient;
}

front
{
type empty;
}

back
{
type empty;
}
}

// ************************************************** *********************** //
I guess the question becomes, how on earth do fans work in 2.x?
Puglin is offline   Reply With Quote

Old   April 25, 2014, 03:58
Default
  #2
New Member
 
Join Date: Mar 2014
Posts: 3
Rep Power: 12
Puglin is on a distinguished road
Nobody has any ideas?

Surely someone must've had cause to implement some kind of pressure gradient in the latest version of openFOAM. Is there any documentation I can consult...? Any more information I can provide...?
Puglin is offline   Reply With Quote

Old   June 7, 2014, 22:57
Default
  #3
New Member
 
Wai Phyo Kyaw
Join Date: May 2014
Posts: 2
Rep Power: 0
Wai Phyo Kyaw is on a distinguished road
Dear Puglin,

I am a beginner for OF, but I think I made a little modification to fan tutorial. In
0/p, 0/u, 0/k and 0/epsilon, and in the system/fvSchemes too. It worked for me. but I am afraid I have no idea it is right or wrong. Anyway I attached the modified zips. hOpe it will work for you too.
Attached Files
File Type: gz FAN(2.2.1).tar.gz (3.1 KB, 105 views)
Wai Phyo Kyaw is offline   Reply With Quote

Old   July 7, 2014, 16:35
Default
  #4
thg
Member
 
Thorsten Grahs
Join Date: Oct 2009
Posts: 61
Rep Power: 16
thg is on a distinguished road
Dear Puglin,

you find the use of the fan b.c for 2.3 f.i. in the tutorial

./incompressible/pimpleFoam/TJunctionFan

where one have in 0/p

cyclicFaces_master
{
type fan;
patchType cyclic;
jump uniform 0;
value uniform 0;
jumpTable polynomial
1((100 0));
}

Like everin in OpenFOAm if you want to understand the stuff, you have to dig deeper...

fan b.c.

./finiteVolume/fields/fvPatchFields/derived/fan


in fanFvPatchFields.C

you find the evaluation of the polynomial/list.
The code state that the old format works, but I have not checked this.

if you want to know, how the polynomial is defined you have to ckeck

$FOAM_SRC/OpenFOAM/primitives/functions/DataEntryolynomial/

in "polynomial.C" f.i.

Foam::scalar Foam:olynomial::value(const scalar x) const
{
scalar y = 0.0;
forAll(coeffs_, i)
{
y += coeffs_[i].first()*pow(x, coeffs_[i].second());
}

return y;
}
thg 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.org] openfoam 2.2.x - mesquite 2.3.0 joegi.geo OpenFOAM Installation 3 February 27, 2017 10:20
Interpreting streamlines of a rotating fan. danbence Visualization & Post-Processing 1 April 8, 2014 10:13
OpenFOAM Foundation releases OpenFOAM 2.2.2 opencfd OpenFOAM Announcements from ESI-OpenCFD 0 October 14, 2013 07:18
ESI-OpenCFD Releases OpenFOAM v2.2.0 opencfd OpenFOAM Announcements from ESI-OpenCFD 13 March 30, 2013 16:52
Propeller Fan Curve Simulation Teng_YJ FLUENT 2 February 16, 2009 19:37


All times are GMT -4. The time now is 06:07.