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

how to use "foamNewFunctionObject"

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 17, 2019, 05:06
Default how to use "foamNewFunctionObject"
  #1
Member
 
DongHo
Join Date: Jul 2013
Posts: 51
Rep Power: 12
eddykendo is on a distinguished road
Dear. Foamers

I have found a useful one "foamNewFunctionObject" in v4.0 to build a new customized function object.
My question is, if I put the command in the terminal such as
foamNewFunctionObject energySpectrum

a new function object named energySpectrum will be automatically generated
in a user directory like home/OpenFOAM/user-4.0, not in a original directory of source codes installed??

It will be appreciate if you have experience like that and let me know it.

Thank you.
eddykendo is offline   Reply With Quote

Old   February 17, 2019, 08:50
Default
  #2
Senior Member
 
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 12
massive_turbulence is on a distinguished road
Quote:
Originally Posted by eddykendo View Post
Dear. Foamers

I have found a useful one "foamNewFunctionObject" in v4.0 to build a new customized function object.
My question is, if I put the command in the terminal such as
foamNewFunctionObject energySpectrum

a new function object named energySpectrum will be automatically generated
in a user directory like home/OpenFOAM/user-4.0, not in a original directory of source codes installed??

It will be appreciate if you have experience like that and let me know it.

Thank you.

The best thing I could fine How to implement a functionObject implementFunctionObject.pdf

via https://pingpong.chalmers.se/public/...tionObject.pdf
massive_turbulence is offline   Reply With Quote

Old   February 18, 2019, 13:48
Default
  #3
Member
 
Join Date: Dec 2018
Location: Darmstadt, Germany
Posts: 87
Rep Power: 7
raumpolizei is on a distinguished road
Hey eddykendo,

Quote:
Originally Posted by eddykendo View Post
a new function object named energySpectrum will be automatically generated
in a user directory like home/OpenFOAM/user-4.0, not in a original directory of source codes installed??
Yes, this is desired/recommended in order to keep your own code segregated from the standard OpenFOAM version you are using. Any new utility, solver, library you are writing should be placed in your own user-OFversion folder. Personaly, I like to keep the same structure for my user directory as the standard folder. If you haven't created the folder yet, try something like this after sourcing your OF-version:

Code:
mkdir $WM_PROJECT_USER_DIR
If you program some new utilities, you can share them much more easily as all your modifications and improvements are included in a compact way in your own user directory.

Cheers
RP
raumpolizei 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



All times are GMT -4. The time now is 16:04.