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 |
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? |
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.
|
The mapDistributes may also need to be corrected?
|
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 |
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, |
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. |
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 |
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.
|
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. |
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 |
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 |
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 |
Quote:
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 |
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. |