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

How to add a Boundary condition???

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 16, 2016, 20:55
Question How to add a Boundary condition???
  #1
New Member
 
Lee
Join Date: Mar 2016
Posts: 22
Rep Power: 10
lxwd is on a distinguished road
Dear all,

I am now trying to add one existing boundary condition, atmBoundaryLayerInletVelocity, from openfoam 3.0.1 to foam-extend 3.1. I follow the tutorial found from foamwiki, as shown below.

HTML Code:
https://openfoamwiki.net/index.php/HowTo_Adding_a_new_boundary_condition
Code:
Choose a boundary condition that is close to the one you want - we'll call it originalFvPatchField.
Copy the directory contents to anywhere (say run/myCode).
Rename all the copied files to a new name (say customFvPatchField).
for i in `ls`; do mv $i `echo $i|sed s/originalFvPatchField/customFvPatchField/g`;done
Search & replace all text in all the new files old name for new name (originalFvPatchField replaced with customFvPatchField)
 for i in `ls`; do sed -i s/originalFvPatchField/customFvPatchField/g $i;done
Modify the code to suit your needs.
Create the directory structure: myCode/Make, and create files and options in it.
Put the relevant info into files:
Search for originalFvPatchField in finiteVolume/Make/files.
Copy the relevant entry (entries) into your myCode/Make/files
Rename the entries as necessary - rename it with your customFvPatchField naming (if there's an s on the end, keep it there).
Tell it what the new library name will be. Use $(FOAM_USER_LIBBIN) instead of $(FOAM_LIBBIN), and add lib to the front of the new name. It should look something like: LIB = $(FOAM_USER_LIBBIN)/libcustomPatchField
The options file should have EXE_INC (for any includes such as -I$(LIB_SRC)/finiteVolume/lnInclude for finiteVolume) and LIB_LIBS (for included libraries, such as -lfiniteVolume for finiteVolume). Look at other LIB_LIBS for examples.
$wmake libso
Add whatever new dictionary entries are needed to your initial conditions files, such as 0/U and 0/P files.
Add libs ( "libcustomFvPatchField.so" "libOpenFOAM.so" ) to controlDict
It should run now.
However, when I type "wmake libso" in the terminal, it gives me the error shown below.

Code:
make: *** No rule to make target `fields/fvPatchFields/derived/atmBoundaryLayer/atmBoundaryLayer.dep', needed by `Make/linux64GccDPOpt/dependencies'.  Stop.
Attached codes is in my "files" and "options" under "Make" directory.

Code:
fvPatchFields = fields/fvPatchFields
derivedFvPatchFields = $(fvPatchFields)/derived
$(derivedFvPatchFields)/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.C
LIB = $(FOAM_USER_LIBBIN)/libatmBoundaryLayerInletVelocityFvPatchVectorField
Code:
EXE_INC = \
    -I$(LIB_SRC)/finiteVolume/lnInclude

LIB_LIBS =
Any help is greatly appreciated!!!

Best Regards,
Lee
lxwd 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
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 08:38
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 08:30
several fields modified by single boundary condition schröder OpenFOAM Programming & Development 3 April 21, 2015 06:09
How to add a boundary condition with journal cmds Cyril FLUENT 0 May 22, 2006 12:16
Convective Heat Transfer - Heat Exchanger Mark CFX 6 November 15, 2004 16:55


All times are GMT -4. The time now is 17:55.