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

User defined function file

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 11, 2019, 07:04
Default User defined function file
  #1
Member
 
David Andersson
Join Date: Oct 2019
Posts: 46
Rep Power: 7
sippanspojk is on a distinguished road
Hi,

I want to define my own function file and I have read up on how it is done. I do have some basic problems though that I hope to get help with.

I am using pimpleFoam as solver and as I've understood I need to copy the whole source code for that solver to my $FOAM_USER_APPBIN directory, rename it, e.g. modifiedPimpleFoam, and then create my function (userFunc.C and userFunc.H files). So far so good?

My first problem is that I can't seam to locate my $FOAM_USER_APPBIN directory. OpenFOAM is not installed under my /home but under /apps/OpenFOAM-6...
When I type ls $FOAM_APPBIN all is good but when I type ls $FOAM_USER_APPBIN I don't find the folder, since it is trying to access /home/<user>/OpenFOAM/<user>

Can someone please help me out here?

/David
sippanspojk is offline   Reply With Quote

Old   October 11, 2019, 09:49
Default
  #2
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 16
Santiago is on a distinguished road
Quote:
Originally Posted by sippanspojk View Post
Hi,

I want to define my own function file and I have read up on how it is done. I do have some basic problems though that I hope to get help with.

I am using pimpleFoam as solver and as I've understood I need to copy the whole source code for that solver to my $FOAM_USER_APPBIN directory, rename it, e.g. modifiedPimpleFoam, and then create my function (userFunc.C and userFunc.H files). So far so good?

My first problem is that I can't seam to locate my $FOAM_USER_APPBIN directory. OpenFOAM is not installed under my /home but under /apps/OpenFOAM-6...
When I type ls $FOAM_APPBIN all is good but when I type ls $FOAM_USER_APPBIN I don't find the folder, since it is trying to access /home/<user>/OpenFOAM/<user>

Can someone please help me out here?

/David
You may used coded class instead, which resembles more closely the concept of an UDF. Some versions of openFOAM have them, and behaviour is different on the different forks:

here is the source code for said function object:

https://github.com/OpenFOAM/OpenFOAM...nctionObject.H
Santiago is offline   Reply With Quote

Reply

Tags
functionobjects, user


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
[swak4Foam] Installation Problem with OF 6 version Aurel OpenFOAM Community Contributions 14 November 18, 2020 17:18
[OpenFOAM.org] Error creating ParaView-4.1.0 OpenFOAM 2.3.0 tlcoons OpenFOAM Installation 13 April 20, 2016 18:34
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 15:11
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00


All times are GMT -4. The time now is 13:53.