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

New boundary condition in solver

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By jherb

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 2, 2013, 13:15
Default New boundary condition in solver
  #1
New Member
 
Richard
Join Date: Aug 2013
Location: Zilina, Slovakia
Posts: 20
Rep Power: 13
Ricardo is on a distinguished road
Hello, I have new boundary condition "convectiveValue" based on fixedValue condition.

I would like use this code in my solver
Code:
 if(T.boundaryField()[patchID1].type() == convectiveValueFvPatchScalarField::typeName)
    {convectiveValueFvPatchScalarField& tValue = refCast<convectiveValueFvPatchScalarField>(T.boundaryField()[patchID1]);
....
I get error message

Code:
 mylaplacianFoam.C:(.text.startup+0x1f95): undefined reference to `Foam::convectiveValueFvPatchField<double>::typeName'
collect2: ld returned 1 exit status
I have #include "convectiveValueFvPatchFields.H" in solver file and link to header in Make/options

any Idea what is wrong?
Thanks
Richard
Ricardo is offline   Reply With Quote

Old   September 3, 2013, 01:17
Default
  #2
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25
nimasam is on a distinguished road
besides library path you should name library binary file which you want to add in the section
Quote:
EXE_LIBS
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Old   September 3, 2013, 04:08
Default
  #3
New Member
 
Richard
Join Date: Aug 2013
Location: Zilina, Slovakia
Posts: 20
Rep Power: 13
Ricardo is on a distinguished road
I added it, but nothing changed..

Code:
EXE_INC = -I$(LIB_SRC)/finiteVolume/lnInclude\
        -I$(FOAM_RUN)/Newton/ 
    
EXE_LIBS = -lfiniteVolume \
            -L$(FOAM_USER_LIBBIN)/libconvectiveValue.so
Ricardo is offline   Reply With Quote

Old   September 3, 2013, 10:04
Default
  #4
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22
jherb is on a distinguished road
Try:
Code:
    
EXE_LIBS = -lfiniteVolume \
            -L$(FOAM_USER_LIBBIN) \
            -lconvectiveValue
(under the assumption that your library is called libconvectiveValue.so and resides in $FOAM_USER_LIBBIN)
nimasam likes this.
jherb is offline   Reply With Quote

Old   September 3, 2013, 14:20
Default
  #5
New Member
 
Richard
Join Date: Aug 2013
Location: Zilina, Slovakia
Posts: 20
Rep Power: 13
Ricardo is on a distinguished road
It works, thank You very much!
Ricardo is offline   Reply With Quote

Old   September 4, 2013, 07:27
Default
  #6
New Member
 
Richard
Join Date: Aug 2013
Location: Zilina, Slovakia
Posts: 20
Rep Power: 13
Ricardo is on a distinguished road
Hello, I have a little question about using interpolationTable. I would like using data measured data ("$FOAM_CASE/constant/sample.dat") for calculating of BC. I tried various combination of constructors, but without succes.

Code:
interpolationTable<List<Tuple2<scalar,scalar> > >
Would you be so kind and give me a sample of code for interpolating scalar value from file?

Thanks
Richard


Solved: bad generic types...

Last edited by Ricardo; September 19, 2013 at 13:32.
Ricardo 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
access boundary condition from solver pascool OpenFOAM Programming & Development 2 April 30, 2015 09:39
Question about heat transfer coefficient setting for CFX Anna Tian CFX 1 June 16, 2013 07:28
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 18:44
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 16:45
Rotating interpolated boundary condition hani OpenFOAM Running, Solving & CFD 0 July 4, 2006 08:09


All times are GMT -4. The time now is 23:28.