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

directMappedVelocityFlux boundary condition

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 13, 2010, 05:45
Default directMappedVelocityFlux boundary condition
  #1
New Member
 
James Jewkes
Join Date: Oct 2010
Location: Perth, WA
Posts: 13
Rep Power: 6
JamesJCFD is on a distinguished road
Hi,

I'm trying to implement a variant of the Lund Wu and Squires inflow condition in OpenFOAM. After having had a bit of a play, is seems that directMappedVelocityFlux is a nice candidate for the starting point.

(I'm aware that there have been bug reports with this boundary condition that have recently been fixed, and I have pulled the latest OpenFOAM-1.7.x image from the git repos accordingly.)

Has anyone managed to get a case working with this boundary condition?

cheers,

James
JamesJCFD is offline   Reply With Quote

Old   October 13, 2010, 23:56
Default
  #2
New Member
 
James Jewkes
Join Date: Oct 2010
Location: Perth, WA
Posts: 13
Rep Power: 6
JamesJCFD is on a distinguished road
OK - as I understand it, for the directMapped boundary condition, there are 3 options in system/changeDictionaryDict for choosing how the recycle plane is sampled;

'nearestCell' - values taken from the closest cell centre?
'nearestFace' - values taken from the middle of the nearest face?
'nearestPatchFace' - values taken from the nearest patch?

however, for directMappedVelocityFlux, there appears to be only 2 functioning options, 'nearestFace' and 'nearestPatchFace'.

I've got a simple 2D channel flow test-case which works fine with directMapped-nearestCell, but crashes for both directMapped-nearestFace and directMappedFixedVelocity-nearestFace.

I've outputted the newUValues variable to screen (from 'case customDirectMappedPolyPatch::NEARESTFACE' in directMappedVelocityFluxFixedValueFvPatchField.C), it doesn't seem to be sampling the velocity field properly?
JamesJCFD is offline   Reply With Quote

Old   October 14, 2010, 02:38
Default
  #3
New Member
 
James Jewkes
Join Date: Oct 2010
Location: Perth, WA
Posts: 13
Rep Power: 6
JamesJCFD is on a distinguished road
It's a bug. The velocity field is written out in the wrong place. I've attached fixed C source files, and will add a bug report.
Attached Files
File Type: c directMappedFixedValueFvPatchField.C (9.7 KB, 35 views)
File Type: c directMappedVelocityFluxFixedValueFvPatchField.C (8.6 KB, 23 views)
JamesJCFD is offline   Reply With Quote

Old   October 14, 2010, 03:12
Default
  #4
New Member
 
James Jewkes
Join Date: Oct 2010
Location: Perth, WA
Posts: 13
Rep Power: 6
JamesJCFD is on a distinguished road
The mapDistributes may also need to be corrected?
JamesJCFD is offline   Reply With Quote

Old   November 5, 2010, 10:47
Default
  #5
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 7
panda60 is on a distinguished road
Dear JamesJCFD,

I also want to do the same work ,and I have struggle it for more than half year.
Indeed eugene said that modifying " directMappedVelocityFlux" is the best method. But I have tried this , nearestFace doesn't work at all, so I gave up in that time. But last month some bugs seems to be fixed by mattijs ,so I will try this again. Maybe we can talk here.

Turbulence inflow generation - recycling method
panda60 is offline   Reply With Quote

Old   November 5, 2010, 10:55
Default
  #6
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 7
panda60 is on a distinguished road
Maybe you can try the latest version, because mattijs has modified this part in October 15, 2010 .

Could you go to this thread, maybe eugene will pay attation to this.

Turbulence inflow generation - recycling method

Best regards,
panda60 is offline   Reply With Quote

Old   January 14, 2011, 10:03
Default
  #7
Senior Member
 
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 7
Fransje is on a distinguished road
Hello James,

I was wondering if you managed to get your implementation of Lund and Squires to work properly with a modified version of directMappedVelocityFlux?

Kind regards,

Francois.
Fransje is offline   Reply With Quote

Old   January 17, 2011, 07:15
Default
  #8
New Member
 
James Jewkes
Join Date: Oct 2010
Location: Perth, WA
Posts: 13
Rep Power: 6
JamesJCFD is on a distinguished road
Hi Franjse,

We used directMappedFixedValueFVPatchField.C as the starting point for the implementation of our variant of the LWS method.
(Jewkes J. W., Chung, Y. M., Carpenter P. W. (2011) Modifications to a Turbulent Inflow Generation Method for Boundary-Layer Flows AIAA Journal, 49 (1), 247 - 250 (0001-1452)).

James
JamesJCFD is offline   Reply With Quote

Old   January 17, 2011, 07:17
Default
  #9
New Member
 
James Jewkes
Join Date: Oct 2010
Location: Perth, WA
Posts: 13
Rep Power: 6
JamesJCFD is on a distinguished road
Just to clarify, the paper mentioned above was produced using our own finite-volume code, however we've recently re-written the code for OpenFOAM.
JamesJCFD is offline   Reply With Quote

Old   January 17, 2011, 09:06
Default
  #10
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 7
panda60 is on a distinguished road
Dear James,
as Eugene has said, "DirectMappedVelocityFluxField " can be the best candidate to achieve this goal. Because you can compile this boundary condition file to your solver together. Whereas "directMappedFixedValueFVPatchField.C" has a lot of file and is to complex to achieve this goal.
panda60 is offline   Reply With Quote

Old   January 18, 2011, 08:48
Default
  #11
Senior Member
 
Mohammad
Join Date: Feb 2010
Location: Shiraz, Iran
Posts: 108
Rep Power: 7
m2montazari is on a distinguished road
hi all,
sorry but i'm new to linux and openfoam. I replaced the changed sourcecode in src folder. now i dont know how to recompile it and set openfoam to use the new BC.
please help...
thank you in advance
m2montazari is offline   Reply With Quote

Old   January 18, 2011, 09:25
Default
  #12
New Member
 
James Jewkes
Join Date: Oct 2010
Location: Perth, WA
Posts: 13
Rep Power: 6
JamesJCFD is on a distinguished road
Hi m2montazari,

If you're new to linux and scientific computing http://software-carpentry.org/ introduces many useful tools and methods.

If you want to learn about OpenFOAM development, and have some funding, the official OpenCFD training courses are excellent.

http://www.openfoam.com/training/

Otherwise, the chalmers website also provides a great introduction;

http://www.tfd.chalmers.se/~hani/kurser/OS_CFD/

For new boundary conditions, The OpenFOAMwiki website provides a good general guide;

http://openfoamwiki.net/index.php/Ho...dary_condition

hope that helps,

James
JamesJCFD is offline   Reply With Quote

Old   January 18, 2011, 09:56
Default
  #13
New Member
 
James Jewkes
Join Date: Oct 2010
Location: Perth, WA
Posts: 13
Rep Power: 6
JamesJCFD is on a distinguished road
Dear Jiang,

WeuseddirectMappedFixedValueFVPatchField.C in the end, although it has been a while since I looked at it. It was a bit fiddlier to modify than directMappedVelocityFluxField, granted.

This boundary condition is very sensitive to initial conditions, so you will also need to create a utility to initialise your flow field correctly.

We're most of the way towards an OpenFOAM implementation of our AIAA paper (a Lund Wu and Squires (LWS) variant), and are working through the validation process. Once our current research is finished, we're planning to make the code available to the wider OpenFOAM community.

James
JamesJCFD is offline   Reply With Quote

Old   May 7, 2011, 19:02
Default
  #14
New Member
 
Perry L. Johnson
Join Date: Feb 2011
Location: Orlando, FL, USA
Posts: 17
Rep Power: 6
PerryLJohnson is on a distinguished road
Quote:
Originally Posted by JamesJCFD View Post
Dear Jiang,

WeuseddirectMappedFixedValueFVPatchField.C in the end, although it has been a while since I looked at it. It was a bit fiddlier to modify than directMappedVelocityFluxField, granted.

This boundary condition is very sensitive to initial conditions, so you will also need to create a utility to initialise your flow field correctly.

We're most of the way towards an OpenFOAM implementation of our AIAA paper (a Lund Wu and Squires (LWS) variant), and are working through the validation process. Once our current research is finished, we're planning to make the code available to the wider OpenFOAM community.

James
James,

I have recently become interested in using the LWS method in OpenFOAM and this thread caught my eye. Are you still planning on making your code available? If so, any idea when this could happen?

Regards,
Perry
PerryLJohnson is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Boundary Conditions Thomas P. Abraham Main CFD Forum 20 July 7, 2013 05:05
How exactly the "pressure outlet" bdry condition compute properties on the boundary? yating9901 FLUENT 3 June 28, 2010 12:26
Transient outlet boundary condition problem jwillie2000 CFX 1 December 7, 2009 18:07
How to set boundary condition in Fluent for the fo Peiyong FLUENT 1 November 10, 2006 12:44
How to resolve boundary condition problem? sam FLUENT 2 July 20, 2003 02:19


All times are GMT -4. The time now is 13:58.