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

fvOptions add momentum force distribution

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By pbachant

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 30, 2017, 12:43
Default fvOptions add momentum force distribution
  #1
New Member
 
Kyle
Join Date: Mar 2016
Posts: 1
Rep Power: 0
Dark Helmet is on a distinguished road
Hi,

I'm new to OpenFOAM, so I'm guessing this is simple but could use really some help. I'd like to add a momentum source via fvOptions to an interFoam simulation. I think that SemiImplicitSource is what I should be using, along the lines of this:

Code:
bodyForce
{
    type vectorSemiImplicitSource;
    active true;
    selectionMode cellZone;
    cellZone heatStrip;

    vectorSemiImplicitSourceCoeffs
    {
        volumeMode specific;
        injectionRateSuSp
        {
            U ((fx fy fz) 0);
        }
    }
}
Hopefully that is the correct syntax. Anyway, the "tricky" part is I want the source to be a function of position, fx = F0*(z-z0)+y etc. Does anyone know how I could do this?
Dark Helmet is offline   Reply With Quote

Old   January 30, 2017, 20:25
Default
  #2
Senior Member
 
Pete Bachant
Join Date: Jun 2012
Location: Boston, MA
Posts: 173
Rep Power: 14
pbachant is on a distinguished road
You may need to write your own source fvOption, or use a codedSource, putting your code in the codeAddSup entry. You'll have access to the mesh object, and therefore cell centers (mesh_.C()), from which you can calculate your source term field to add to eqn.source().

See https://github.com/OpenFOAM/OpenFOAM.../CodedSource.H for the source code and dictionary syntax.
kaifu, cfd@kgp and Dark Helmet like this.
__________________
Home | Twitter | GitHub
pbachant 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
Using fvOptions to add a momentum source wallace OpenFOAM Programming & Development 9 December 9, 2015 10:41
how to add a damping in the momentum equation htq2014 OpenFOAM Running, Solving & CFD 0 November 23, 2014 23:34
Momentum by force equation in UDF tom634 Fluent UDF and Scheme Programming 0 October 18, 2013 05:14
How to add a wall momentum source to a solver boeleman OpenFOAM Programming & Development 1 February 6, 2013 19:32
Force on cylinders through momentum balance Mauro Oliveira Main CFD Forum 0 April 14, 2000 08:27


All times are GMT -4. The time now is 12:48.