|
[Sponsors] |
attachDetach Topology Modifier: Proper Turbulent Boundary Conditions |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 2, 2012, 20:13 |
attachDetach Topology Modifier: Proper Turbulent Boundary Conditions
|
#1 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Hello Foamers!
I've been playing around with the attachDetach topology modifier and have been itching to get it working with turbulence. I've got two cases that I've tried with laminar flow, both of which work well (in the sense that they don't crash) which I've uploaded with this thread. They are based on the TJunction case for pimpleFoam, with the extra feature of a "valve" that closes off flow into one of the branches. I would be more than happy to make this a wiki page once I get it working to help other users. This is for OF21x, but the procedure is the same for anything since 16ext as well To run both cases (TJunctionClosedFirst and TJunctionOpenFirst) under 21x, you'll need to unpack attachDetachFvMesh.tar.gz to $FOAM_SRC/topoChangerFvMesh and add Code:
attachDetachFvMesh/attachDetachFvMesh.C Both cases use pimpleDyMFoam, and have a Allrun script that creates the meshes and run the simulations. TJunctionClosedFirst has to merge two meshes (unless there is an easier way of creating walls for the valve), so after the simulation has run there will be a new directory TJunction which contains the actual data. Run both cases as-is to see the laminar behaviour, which proves the topology modifier works as it should. To run turbulent, change the appropriate line in constant/RASProperties (for TJunctionClosedFirst, you'll need to change it in TJunction1/constant/RASProperties). The error occurs somewhere in the turbulence->correct() call after the faces go from being internal to boundary patches. This seems to be related to values of k or epsilon being zero somewhere: Code:
Courant Number mean: 0.220134 max: 0.499147 deltaT = 0.000298507 Time = 2 bool attachDetach::changeTopology() const for object valve : Triggering attach/detach topology change. Current time: 2 current trigger time: 2 trigger index: 0 Modifier 0 named valve morphing void attachDetach::detachInterface(polyTopoChange& ref) const for object valve : Detaching interface void attachDetach::detachInterface(polyTopoChange& ref) const for object valve : Finished detaching interface DILUPBiCG: Solving for Ux, Initial residual = 0.00368108, Final residual = 1.66437e-06, No Iterations 2 DILUPBiCG: Solving for Uy, Initial residual = 0.00279846, Final residual = 1.53383e-06, No Iterations 2 DILUPBiCG: Solving for Uz, Initial residual = 0.00188171, Final residual = 4.48494e-07, No Iterations 2 GAMG: Solving for p, Initial residual = 0.520347, Final residual = 0.214301, No Iterations 1000 time step continuity errors : sum local = 0.00113155, global = -1.20446e-05, cumulative = -1.37368e-05 GAMG: Solving for p, Initial residual = 0.135724, Final residual = 0.0419013, No Iterations 1000 time step continuity errors : sum local = 0.000493047, global = -2.032e-05, cumulative = -3.40569e-05 #0 Foam::error::printStack(Foam::Ostream&) in "/home/mturcios/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigFpe::sigHandler(int) in "/home/mturcios/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #2 Uninterpreted: #3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/home/mturcios/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/mturcios/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so" #5 Foam::incompressible::RASModels::RNGkEpsilon::correct() in "/home/mturcios/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so" #6 in "/home/mturcios/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/bin/pimpleDyMFoam" #7 __libc_start_main in "/lib/libc.so.6" #8 at /usr/src/packages/BUILD/glibc-2.11.3/csu/../sysdeps/i386/elf/start.S:122 Code:
Courant Number mean: 0.22037 max: 0.498308 deltaT = 0.000299285 Time = 2 bool attachDetach::changeTopology() const for object valve : Triggering attach/detach topology change. Current time: 2 current trigger time: 2 trigger index: 0 Modifier 0 named valve morphing void attachDetach::detachInterface(polyTopoChange& ref) const for object valve : Detaching interface void attachDetach::detachInterface(polyTopoChange& ref) const for object valve : Finished detaching interface DILUPBiCG: Solving for Ux, Initial residual = 0.0038858, Final residual = 1.30384e-06, No Iterations 2 DILUPBiCG: Solving for Uy, Initial residual = 0.00278652, Final residual = 1.56476e-06, No Iterations 2 DILUPBiCG: Solving for Uz, Initial residual = 0.00193932, Final residual = 4.80674e-07, No Iterations 2 GAMG: Solving for p, Initial residual = 0.52962, Final residual = 0.243818, No Iterations 1000 time step continuity errors : sum local = 0.00127258, global = 8.9244e-07, cumulative = 8.88314e-07 GAMG: Solving for p, Initial residual = 0.126708, Final residual = 0.0158993, No Iterations 1000 time step continuity errors : sum local = 0.000205975, global = -1.05775e-05, cumulative = -9.6892e-06 bounding k, min: -1.5986e-51 max: 1.44949 average: 0.190389 bounding epsilon, min: -1.59926e-51 max: 152.799 average: 15.3409 correct RASModel Create new G field Update G at wall Dissipation equation DILUPBiCG: Solving for epsilon, Initial residual = 0.00342873, Final residual = 7.04553e-06, No Iterations 1 DILUPBiCG: Solving for k, Initial residual = 0.00850805, Final residual = 7.2587e-08, No Iterations 2 #0 Foam::error::printStack(Foam::Ostream&) in "/home/mturcios/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigFpe::sigHandler(int) in "/home/mturcios/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" #2 Uninterpreted: #3 Foam::incompressible::RASModels::nutkWallFunctionFvPatchScalarField::calcNut() const in "/home/mturcios/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so" #4 Foam::incompressible::RASModels::nutkWallFunctionFvPatchScalarField::updateCoeffs() in "/home/mturcios/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so" #5 Foam::fvPatchField<double>::evaluate(Foam::UPstream::commsTypes) in "/home/mturcios/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/bin/pimpleDyMFoam" #6 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::evaluate() in "/home/mturcios/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/bin/pimpleDyMFoam" #7 Foam::incompressible::RASModels::kEpsilon::correct() in "/home/mturcios/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/lib/libincompressibleRASModels.so" #8 in "/home/mturcios/OpenFOAM/OpenFOAM-2.1.x/platforms/linuxGccDPOpt/bin/pimpleDyMFoam" #9 __libc_start_main in "/lib/libc.so.6" #10 at /usr/src/packages/BUILD/glibc-2.11.3/csu/../sysdeps/i386/elf/start.S:122 Floating point exception Hopefully this is something small that can be dealt with through boundary conditions. Note that I've tried this case in 1.6ext and get similar errors, which again lead me to believe that its a boundary condition problem. Thanks! Last edited by mturcios777; May 3, 2012 at 14:26. Reason: Change in second error message |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Integral boundary conditions turbulent intensitylength boundary conditions | olesen | OpenFOAM Running, Solving & CFD | 0 | July 27, 2006 07:18 |
Turbulent boundary conditions for bubble column | anjai | FLUENT | 12 | October 17, 2005 06:34 |
New topic on same subject - Flow around race car | Tudor Miron | CFX | 15 | April 2, 2004 06:18 |
Please help with flow around car modelling! | Tudor Miron | CFX | 17 | March 19, 2004 19:23 |
Turbulent Mass Injection Boundary Conditions | B. Laubacher | Main CFD Forum | 6 | October 16, 1999 11:56 |