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

Boundary conditions for simulating a car during cornering

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 12, 2020, 16:18
Default Boundary conditions for simulating a car during cornering
  #1
New Member
 
Nederland
Join Date: Aug 2019
Posts: 2
Rep Power: 0
BBack is on a distinguished road
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;	

    }




}


// ************************************************************************* //
Boundary conditions curved 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;
    }

    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;

    }




}


// ************************************************************************* //
Attached Images
File Type: png Cornering_Setup.png (26.3 KB, 25 views)
File Type: jpg Resultsp_CurvedDomain.jpg (24.7 KB, 33 views)
File Type: jpg Resultsp_Square.jpg (25.4 KB, 26 views)
File Type: jpg ResultsU_CurvedDomain.jpg (24.8 KB, 24 views)
File Type: jpg ResultsU_Square.jpg (36.6 KB, 25 views)
BBack 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
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


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