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

Custom Boundary Condition Compiles but does not run

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By ssss
  • 1 Post By ssss
  • 1 Post By avd28

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 6, 2015, 15:18
Default Custom Boundary Condition Compiles but does not run
  #1
New Member
 
Join Date: May 2015
Posts: 29
Rep Power: 11
avd28 is on a distinguished road
Hi all,

I have a custom boundary condition which defines my mesh motion. The B.C has been compiled without any errors and I have included the .so file in my controlDict. Howerver, the solver (pimpleDyMFoam) still refuses to recognize it as a valid patch-field type. Attached below is the dropbox link to my case, and custom BCs which also contains a log file with the error.

I have been through the standard openfoam discussions on this subject, but none of the suggestions there seem to work.

https://www.dropbox.com/s/ox3nefq8wj...roovy.zip?dl=0
https://www.dropbox.com/s/wygbbb0jjy...Filed.zip?dl=0
avd28 is offline   Reply With Quote

Old   August 6, 2015, 18:10
Default
  #2
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13
ssss is on a distinguished road
You have to link your library in your controlDict

libs("mylib.so");
ssss is offline   Reply With Quote

Old   August 6, 2015, 18:16
Default
  #3
New Member
 
Join Date: May 2015
Posts: 29
Rep Power: 11
avd28 is on a distinguished road
As I mentioned in my original post, I have done so.
avd28 is offline   Reply With Quote

Old   August 6, 2015, 18:23
Default
  #4
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13
ssss is on a distinguished road
Sorry didn't read correctly your post. Are you sure that the .so file appears in your $FOAM_USER_LIBBIN or $FOAM_LIBBIN directories?
ssss is offline   Reply With Quote

Old   August 6, 2015, 18:24
Default
  #5
New Member
 
Join Date: May 2015
Posts: 29
Rep Power: 11
avd28 is on a distinguished road
Yes, it appears in the $FOAM_USER_LIBBIN. I have confirmed it multiple times. Could you try compiling the BC and running it?
avd28 is offline   Reply With Quote

Old   August 7, 2015, 06:27
Default
  #6
Member
 
Join Date: May 2014
Posts: 40
Rep Power: 12
Phil_ is on a distinguished road
Did you search & replace all the old BC-names with the new ones in the source files?

Better check all the steps given in the following post: http://www.cfd-online.com/Forums/ope...tml#post245761

Good luck
Phil_ is offline   Reply With Quote

Old   August 7, 2015, 07:52
Default
  #7
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13
ssss is on a distinguished road
As I can see you are using in your pointMotionU file:

Code:
type            myRelativeVelocityPointPatchVectorField;
But in your myRelativeVelocityPointPatchVectorField.H file you are defining:

Code:
 TypeName("myRelativeVelocity");
So you should use in your pointMotionU file:

Code:
type            myRelativeVelocity;
hk318i likes this.
ssss is offline   Reply With Quote

Old   August 7, 2015, 14:36
Default
  #8
New Member
 
Join Date: May 2015
Posts: 29
Rep Power: 11
avd28 is on a distinguished road
Hi ssss,

Thanks, a lot. It has apparently compiled and now runs correctly, but a new error crops up.

Quote:
--> FOAM FATAL IO ERROR:
Essential entry 'value' missing

file: /home/avd28/OpenFOAM/avd28-2.3.0/snz/snz1_groovy/0/pointMotionU.boundaryField.inlet from line 25 to line 29.

From function pointPatchField<Type>:ointPatchField(const fvPatch& p,const DimensionedField<Type, pointMesh>& iF,const dictionary& dict,const bool valueRequired)
in file /home/avd28/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/valuePointPatchField.C at line 96.

FOAM exiting
It would appear that this boundary condition requires, an additional entry "value" to run. Analysis of the constructors tells me that this BC requires the following entries

Quote:
fixedValuePointPatchField<vector>(p, iF),
amplitude_(0.0),
refPoint_(vector::zero),
period_(0.0),
t0_(0.0)
Given my recent entry into OpenFOAM, i believed that the,
Quote:
fixedValuePointPatchField<vector>(p, iF),
stood for the following line in the pointMotionU file
Quote:
type myRelativeVelocity;
It now appears I was wrong. But then, what is the "value" that I'm missing here?
avd28 is offline   Reply With Quote

Old   August 7, 2015, 16:36
Default
  #9
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13
ssss is on a distinguished road
The value token needs to be set for every boundary condition, so don't worry, it wont be used in your custom BC. Just set value uniform 0 or whichever value you prefer
BSengupta likes this.
ssss is offline   Reply With Quote

Old   August 7, 2015, 17:49
Default
  #10
New Member
 
Join Date: May 2015
Posts: 29
Rep Power: 11
avd28 is on a distinguished road
SSSS,

Whoever you are, I wish to thank you from the bottom of my heart. You've just cleared a month of logjammed work for me. Everything works as advertised. I guess I have to brush up my advanced C++ knowledge.
BSengupta likes this.
avd28 is offline   Reply With Quote

Reply

Tags
boundary condition, custom field function, pimpledymfoam


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
Time dependant pressure boundary condition yosuke1984 OpenFOAM Verification & Validation 3 May 6, 2015 07:16
Radiation interface hinca CFX 15 January 26, 2014 18:11
CFX fails to calculate a diffuser pipe flow shenying0710 CFX 7 March 26, 2013 05:13
warning message with custom boundary condition during decomposePar romant OpenFOAM Programming & Development 2 June 9, 2011 03:16
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 05:05


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