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

A modified turbulentVelocity inlet BC

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 30, 2015, 18:14
Default A modified turbulentVelocity inlet BC
  #1
New Member
 
Miha Pogačar
Join Date: Jun 2014
Posts: 3
Rep Power: 11
miha.pog is on a distinguished road
Hello fellow OpenFOAMers!

I have a problem with implementing a custom inlet BC in my 2D channel-flow problem. I am trying to define a turbulent velocity profile on the inlet (the 1/n-th power law), parameters of which are derived from the input volumeFlowRate and calculated hydraulic diameter from the inlet patch.
The idea is pretty straightforward (at least when doing the calculations by hand), but my being a noob in C++ makes it difficult just finding the right lead when debugging. The code compiles without error:
********
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file turbulentVolumeFlowVelocityFvPatchVectorField.C
SOURCE=turbulentVolumeFlowVelocityFvPatchVectorFie ld.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam231/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam231/src/OpenFOAM/lnInclude -I/opt/openfoam231/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/turbulentVolumeFlowVelocityFvPatchVectorField.o
'/home/miha/OpenFOAM/miha-2.3.1/platforms/linux64GccDPOpt/lib/libturbulentVolumeFlowVelocityFvPatchVectorField.s o' is up to date.
********

The problem comes in when I run my BASh script and try to decompose the case:

***************
Number of processor faces = 28
Max number of cells = 19336 (4.87038% above average 18438)
Max number of processor patches = 1 (0% above average 1)
Max number of faces between processors = 28 (0% above average 28)
Time = 0
#0 Foam::error:rintStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::turbulentVolumeFlowVelocityFvPatchVectorFiel d::updateCoeffs() at ??:?
#4 Foam::turbulentVolumeFlowVelocityFvPatchVectorFiel d::turbulentVolumeFlowVelocityFvPatchVectorField(F oam::fvPatch const&, Foam:imensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#5 Foam::fvPatchField<Foam::Vector<double> >::adddictionaryConstructorToTable<Foam::turbulent VolumeFlowVelocityFvPatchVectorField>::New(Foam::f vPatch const&, Foam:imensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#6 Foam::fvPatchField<Foam::Vector<double> >::New(Foam::fvPatch const&, Foam:imensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#7 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::readField( Foam:imensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#8 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::readFields(Foam::dictionary const&) at ??:?
#9 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::readFields() at ??:?
#10 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&) at ??:?
#11
at ??:?
#12
at ??:?
#13 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#14
at ??:?
runInterPhaseChangePar.sh: line 14: 7417 Floating point exception(core dumped) decomposePar -force
Parallel processing using SYSTEMOPENMPI with 2 processors
***************


I got the source and header file from the CFD-forum, a parabolicVelocity inlet BC, which compiled and ran without error. I'm certain I'm making a very obvious mistake, but it illudes me ATM.
Any comment/hint/oppinion would be very appreciated!

Miha

************
My .H file
http://pastebin.com/CRvfghtr
My .C file
http://pastebin.com/sJXbr6G3
miha.pog is offline   Reply With Quote

Reply

Tags
boundary condition, c++, inlet, turbulent, velocity


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
setting the correct format of nonuniform List<vector> for inlet in 0 Folder cfdonline2mohsen OpenFOAM Running, Solving & CFD 8 July 18, 2019 08:03
Problem with assigned inlet velocity profile as a boundary condition Ozgur_ FLUENT 5 August 25, 2015 04:58
can't read the librairy of a modified inlet condition Eloise OpenFOAM Running, Solving & CFD 4 June 10, 2013 09:59
Inlet Velocity in CFX aeroman CFX 12 August 6, 2009 18:42
Diffusion component at inlet Balaji FLUENT 2 August 8, 2005 07:37


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