CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   directMappedVelocityFlux boundary condition (https://www.cfd-online.com/Forums/openfoam/80998-directmappedvelocityflux-boundary-condition.html)

JamesJCFD October 13, 2010 05:45

directMappedVelocityFlux boundary condition
 
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 October 13, 2010 23:56

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 October 14, 2010 02:38

2 Attachment(s)
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.

JamesJCFD October 14, 2010 03:12

The mapDistributes may also need to be corrected?

panda60 November 5, 2010 09:47

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.

http://www.cfd-online.com/Forums/ope...ng-method.html

panda60 November 5, 2010 09:55

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.

http://www.cfd-online.com/Forums/ope...ng-method.html

Best regards,

Fransje January 14, 2011 09:03

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.

JamesJCFD January 17, 2011 06:15

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 January 17, 2011 06:17

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.

panda60 January 17, 2011 08:06

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.

m2montazari January 18, 2011 07:48

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

JamesJCFD January 18, 2011 08:25

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 January 18, 2011 08:56

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

PerryLJohnson May 7, 2011 19:02

Quote:

Originally Posted by JamesJCFD (Post 290944)
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

vicyclesix February 12, 2021 07:37

Recycling techniques can be susceptive to nonphysical interaction between the downstream recycle plane and the inlet plane.
shareit get-vidmateapk.com


All times are GMT -4. The time now is 00:32.