|
[Sponsors] |
January 30, 2015, 19:14 |
A modified turbulentVelocity inlet BC
|
#1 |
New Member
Miha Pogačar
Join Date: Jun 2014
Posts: 3
Rep Power: 12 |
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 |
|
Tags |
boundary condition, c++, inlet, turbulent, velocity |
|
|
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 09:03 |
Problem with assigned inlet velocity profile as a boundary condition | Ozgur_ | FLUENT | 5 | August 25, 2015 05:58 |
can't read the librairy of a modified inlet condition | Eloise | OpenFOAM Running, Solving & CFD | 4 | June 10, 2013 10:59 |
Inlet Velocity in CFX | aeroman | CFX | 12 | August 6, 2009 19:42 |
Diffusion component at inlet | Balaji | FLUENT | 2 | August 8, 2005 08:37 |