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

Customized fvOptions-class for momentum source: no rule to make target

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By potentialFoam

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 10, 2015, 06:02
Default Customized fvOptions-class for momentum source: no rule to make target
  #1
Member
 
Peter
Join Date: Nov 2015
Location: Hamburg, Germany
Posts: 57
Rep Power: 10
potentialFoam is on a distinguished road
Dear Foamers,

I would like to create my own fvOptions-class to introduce a momentum source term. (Unfortunately, none of the existing classes help me.)

Approach:
I copied the 'actuationDiskSource'-folder,
I renamed the files and names inside from 'actuationDisk...' to 'newSource...',
I added the 'newSource.C'-file in '$FOAM_SRC/fvOptions/Make/files',
then I tried to compile it with 'wmake' and 'wmake libso'.

Result:
All files which exist for e.g. 'actuationDiskSource' are created for 'newSource' too, like in 'platforms/linux.../...'.

BUT:
It doesn't work.
-1.) Compiling message:
Code:
...
no rule to make target ».../OpenFOAM-3.0.0/platforms/linux64GccDPInt32Opt/src/fvOptions/new.dep« ...
required from ».../OpenFOAM-3.0.0/platforms/linux64GccDPInt32Opt/src/fvOptions/new.o«
...
(loosely translated from german message)

Why?

-2.) Running simpleFoam with a 'fvOptions'-file (adapted from 'actuationDiskSource') returns an error, that the type is not known:

Code:
--> FOAM FATAL ERROR: 
Unknown Model type newSource
Why...?

Does anyone has an idea? That would be very cool!!! =)
potentialFoam is offline   Reply With Quote

Old   December 10, 2015, 14:52
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: For the first issue, you have the following in the output:
Code:
src/fvOptions/new.dep
This means that there is an entry in "Make/files" named "new.C".

In addition, try cleaning before building:
Code:
wclean libso
wmake libso
As for the second issue, are you asking OpenFOAM to pretend that the library was built with success?
wyldckat is offline   Reply With Quote

Old   December 11, 2015, 02:52
Default
  #3
Member
 
Peter
Join Date: Nov 2015
Location: Hamburg, Germany
Posts: 57
Rep Power: 10
potentialFoam is on a distinguished road
Thanks!!

Further information:

This was my file 'Make/files':
Code:
...
$(derivedSources)/newSource/newSource.C  // new fvOptions
...
I think the comment '// new fvOptions' led to the error (or rather the reference to 'new.dep'.
I changed the comment to
Code:
...
$(derivedSources)/newSource/newSource.C  /* new fvOptions */
...
and it worked.

So, your were right, the reason was the 'new' inside 'Make/files'...
Thanks for your help!
wyldckat likes this.
potentialFoam 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
mapFields Error with snappyHexMesh Source Added Layers sherif35 OpenFOAM Pre-Processing 0 September 29, 2014 17:01
centOS 5.6 : paraFoam not working yossi OpenFOAM Installation 2 October 9, 2013 01:41
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 12:41
mixerVesselAMI2D's mass is not balancing sharonyue OpenFOAM Running, Solving & CFD 6 June 10, 2013 09:34
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 20:30


All times are GMT -4. The time now is 18:31.