|
[Sponsors] |
Boundary conditions for simulating a car during cornering |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 12, 2020, 16:18 |
Boundary conditions for simulating a car during cornering
|
#1 |
New Member
Nederland
Join Date: Aug 2019
Posts: 2
Rep Power: 0 |
Hi everyone,
I am a new user of OpenFoam interested in making a simulation of a car in cornering but I running into some problems. The goal is to recreate a simulation as shown in the first picture, the setup of the patches was done successfully but there seems to be some problem with the boundary conditions. While the flow structure seems okay, as seen from the LIC, the velocity shows some weird output as seen on the outlet patches. Moreover the pressure field for the inlet patches seems off from what is to be expected. I already tried putting different boundary conditions but no success yet, I also tried rotating the domain with MRF and giving the inlet velocity to zero. Anybody has any idea what the problem could be, the relevant boundary conditions are given in the attachment. I know there is also another way of simulating a car in cornering by using a curved domain (although this is less preferred since it reduces mesh quality). Also here I ran into problems with the boundary conditions for the inlet and/or outlet patch, while velocity seems good, pressure is not correct since it is to be expected to be equal over the whole domain. OpenFoam version is v1812, running porousSImpleFoam with k-omega SST with mesh made in blockmesh. Thank you in advance for your time. Boundary conditions square domain Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1812 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // //#include "include/initialConditions" dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { #includeEtc "caseDicts/setConstraintTypes" inlet { //type zeroGradient; type outletInlet; outletValue $internalField; value $internalField; } outlet { type fixedValue; value uniform 0; } "(innerwall|outerwall|upperwall)" { type slip; } lowerWall { type zeroGradient; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1812 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { #includeEtc "caseDicts/setConstraintTypes" inlet { type groovyBC; variables ( "yp2=pos().y;" "xp2=pos().x;" "y0=-9.125;" "r2=sqrt(pow(xp2,2)+pow(yp2-y0,2));" "w=1.53;" "U_tx=-w*(yp2-y0);" "U_ty=w*xp2;" "U_ax=0;" ); valueExpression "vector(U_tx, U_ty, U_ax)"; value uniform (0 0 0); } lowerWall { type rotatingWallVelocity; origin (0 -9.125 0); axis (0 0 1); omega 1.53; value uniform (0 0 0); } "(innerwall|outerwall|upperwall)" { type slip; value $internalField; } outlet { //type pressureInletOutletVelocity; //value uniform (0 0 0); type inletOutlet; inletValue $internalField; value $internalField; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1812 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // //#include "include/initialConditions" dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { #includeEtc "caseDicts/setConstraintTypes" inlet { type zeroGradient; } outlet { type fixedValue; value uniform 0; } "(innerwall|outerwall|upperwall)" { type slip; } lowerWall { type zeroGradient; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: v1812 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { #includeEtc "caseDicts/setConstraintTypes" inlet { type groovyBC; variables ( "yp2=pos().y;" "xp2=pos().x;" "y0=-9.125;" "r2=sqrt(pow(xp2,2)+pow(yp2-y0,2));" "w=1.53;" "U_tx=-w*(yp2-y0);" "U_ty=w*xp2;" "U_ax=0;" ); valueExpression "vector(U_tx, U_ty, U_ax)"; value uniform (0 0 0); } lowerWall { type rotatingWallVelocity; origin (0 -9.125 0); axis (0 0 1); omega 1.53; value uniform (0 0 0); } "(innerwall|outerwall|upperwall)" { type slip; value $internalField; } outlet { type pressureInletOutletVelocity; value $internalField; } } // ************************************************************************* // |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFD analaysis of Pelton turbine | amodpanthee | CFX | 31 | April 19, 2018 18:02 |
Out File does not show Imbalance in % | Mmaragann | CFX | 5 | January 20, 2017 10:20 |
Difficulty In Setting Boundary Conditions | Moinul Haque | CFX | 4 | November 25, 2014 17:30 |
Low Mixing time Problem | Mavier | CFX | 5 | April 29, 2013 00:00 |
Error finding variable "THERMX" | sunilpatil | CFX | 8 | April 26, 2013 07:00 |