View Issue Details

IDProjectCategoryView StatusLast Update
0001922OpenFOAMBugpublic2016-06-17 08:35
Reporterhk318i Assigned Tohenry  
PrioritynoneSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version15.04
Product Versiondev 
Summary0001922: fixedValue profile BC
DescriptionHello,

For some cases it is really important to specify the BC as a fixed profile like atmBoundaryLayerInletVelocity. There is a repeated question about how to use a velocity profile from experimental data as a fixed value BC. I made a quick check and found that all the required classes are available. Therefore I am proposing the attached a general BC which is based on uniformFixedValue. Basically is almost the same BC but interpolates over the patch face centres values instead of time. I think the DataEntry class is general enough and it is not limited to time interpolation. Thus there is no required changes in any core class.

Best wishes,
Hassan
Steps To ReproduceI tested using the elbow tutorial as velocity inlet BC and it worked fine.
Additional InformationMaybe it is not the most efficient way but I think such BC is useful for many users and it will be a good addition to OpenFOAM. Please if you are going to add it, chose a better name for it. I could not find a good representative name.
TagsNo tags attached.

Activities

hk318i

2015-11-22 00:52

reporter  

henry

2015-11-22 09:12

manager   ~0005655

This BC is not clear to me. What is "uniform" in it? My understanding is that you want to map data onto a patch and apply that as fixedValue which is what timeVaryingMappedFixedValueFvPatchField is designed for. How does your BC differ from timeVaryingMappedFixedValueFvPatchField and what is the advantage of supporting another BC with the same purpose?

        //- Direction of the z-coordinate
        vector zDir_;

        //- Direction of the z-coordinate
        vector refPoint_;

is odd. Why is a direction needed?

        autoPtr<DataEntry<Type> > uniformValue_;

Is the value really uniform? If so why not simply use uniformFixedValueFvPatchField?

hk318i

2015-11-22 11:08

reporter   ~0005657

The BC value is varying in zDir but it is fixed in time. Suppose you have an inlet velocity profile comes from experiential data maybe in csv file format, this BC should do this job.
In summery, it is non-uniform along one direction. The key value in DataEntry is not the time values, it is the distance along the patch. You are totally right the name doesn’t make any sense.

henry

2015-11-22 11:41

manager   ~0005658

Also the use of "z" as the coordinate direction is a bit confusing given that it could be any direction and for 2D cases generally "y". Note that the convention in OpenFOAM BCs is that "uniform" means uniform is space, not time and that fixed-value BCs are assumed constant in time unless "timeVarying" is included in the name"

Could you update the BC, changing the name the direction specification and updating the description to better explain the purpose and usage?

hk318i

2015-11-22 12:10

reporter   ~0005659

Sure no problem, I will update it. Thank you!

hk318i

2015-11-22 22:47

reporter  

hk318i

2015-11-22 22:47

reporter  

pitzDaily.tar.gz (3,412 bytes)

hk318i

2015-11-22 22:55

reporter   ~0005663

I updated the BC and changed some names and the description as well. I hope it is more clear this time. Also, I uploaded a test case based on pitzDaily tutorial (pimpleFoam) with a parabolic velocity inlet from csv file.

richard

2015-11-23 04:20

reporter   ~0005664

Hi hk318i,

Reiterating Henry's first post, it seems timeVaryingMappedFixedValue may already have the functionality you're after.

Please check out the $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDailyExptInlet tutorial and see if the inlet mapping demonstrated there meets your needs.

Note: The inlet data is read from constant/boundaryData/inlet/... and note the inlet profile data into separate files for points and values

hk318i

2015-11-24 11:11

reporter   ~0005667

Hello Richard,

You are right, timeVaryingMappedFixedValue can do the job as in pitzDailyExptInlet if only 0 filed is provided as I understand. Indeed it is a really powerful BC and more general than the proposed case here. However I believe it is not the most efficient or the simplest way to apply in this case. This idea came to my attention because I read this question manytimes about importing BC profile directly from csv. Fortunately all the hard work to develop this BC is already implemented in OpenFOAM which encouraged me to propose this idea here. I think it will be a good option for many users.

Best wishes,
Hassan

henry

2015-11-24 16:44

manager   ~0005670

@Hassan: Thanks for the new BC, I think it is generally useful enough that it should be included in OpenFOAM releases. I have made some changes to it and other DataEntry BCs for consistency and ease of maintenance. I have also changed the name and some of the member data to simplify input and changed the refPoint to the scalar origin along the direction vector which I think is slightly easier to work with. If there are any problems with these changes please re-open this report.

Resolved in OpenFOAM-dev by commit 528cc5622be2ac550a2cddc125b2bdf3ac8cd028

Issue History

Date Modified Username Field Change
2015-11-22 00:52 hk318i New Issue
2015-11-22 00:52 hk318i File Added: uniformFixedProfileValue.tar.gz
2015-11-22 09:12 henry Note Added: 0005655
2015-11-22 11:08 hk318i Note Added: 0005657
2015-11-22 11:41 henry Note Added: 0005658
2015-11-22 12:10 hk318i Note Added: 0005659
2015-11-22 22:47 hk318i File Added: fixedValueProfile.tar.gz
2015-11-22 22:47 hk318i File Added: pitzDaily.tar.gz
2015-11-22 22:55 hk318i Note Added: 0005663
2015-11-23 04:20 richard Note Added: 0005664
2015-11-24 11:11 hk318i Note Added: 0005667
2015-11-24 16:44 henry Note Added: 0005670
2015-11-24 16:44 henry Status new => resolved
2015-11-24 16:44 henry Resolution open => fixed
2015-11-24 16:44 henry Assigned To => henry