CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Fixed walls boundary conditions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 28, 2024, 07:01
Default Fixed walls boundary conditions
  #1
New Member
 
Andrea
Join Date: Apr 2024
Posts: 18
Rep Power: 2
Andre1742 is on a distinguished road
Hi everybody,

I would like to run a simulation to check the results of my wind tunnel experiments. This experiment involves a truck tested in a wind tunnel at my university (nothing serious, just a university project).

The walls and the ground were fixed. I would like to impose this boundary condition in my OpenFOAM simulation. I tried to do this, but OpenFOAM is giving me an undefined error, and I'm not sure what I could change.

Any suggestions? Thank you all! Motrice, trailer, and ruote represent my model.

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#include "include/initialConditions"

dimensions [0 1 -1 0 0 0 0];

internalField uniform $flowVelocity;

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"

#include "include/fixedInlet"

outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value $internalField;
}

symmetryPlanepatch
{
type symmetryPlane;
}

lowerWall
{
type fixedValue;
value uniform (0 0 0);
}
upperWall
{
type fixedValue;
value uniform (0 0 0);
}
frontAndBack
{
type fixedValue;
value uniform (0 0 0);
}

Motrice
{
type fixedValue;
value uniform (0 0 0);
}
Trailer
{
type fixedValue;
value uniform (0 0 0);
}
Ruota1
{
type fixedValue;
value uniform (0 0 0);
}
Ruota2
{
type fixedValue;
value uniform (0 0 0);
}
Ruota3
{
type fixedValue;
value uniform (0 0 0);
}
Ruota4
{
type fixedValue;
value uniform (0 0 0);
}
Ruota5
{
type fixedValue;
value uniform (0 0 0);
}
Ruota6
{
type fixedValue;
value uniform (0 0 0);
}
Ruota7
{
type fixedValue;
value uniform (0 0 0);
}
Ruota8
{
type fixedValue;
value uniform (0 0 0);
}


}


// ************************************************** *********************** //



/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: 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 $pressure;

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"

inlet
{
type zeroGradient;
}
symmetryPlanepatch
{
type symmetryPlane;
}
outlet
{
type fixedValue;
value $internalField;
}
upperWall
{
type zeroGradient;
}

frontAndBack
{
type zeroGradient;
}
lowerWall
{
type zeroGradient;
}

Motrice
{
type zeroGradient;
}
Trailer
{
type zeroGradient;
}
Ruota1
{
type zeroGradient;
}
Ruota2
{
type zeroGradient;
}
Ruota3
{
type zeroGradient;
}
Ruota4
{
type zeroGradient;
}
Ruota5
{
type zeroGradient;
}
Ruota6
{
type zeroGradient;
}
Ruota7
{
type zeroGradient;
}
Ruota8
{
type zeroGradient;
}

}


// ************************************************** *********************** //


/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object omega;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#include "include/initialConditions"

dimensions [0 0 -1 0 0 0 0];

internalField uniform $turbulentOmega;

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"

#include "include/fixedInlet"

outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}

symmetryPlanepatch
{
type symmetryPlane;
}

lowerWall
{
type omegaWallFunction;
value uniform 0;
}
upperWall
{
type omegaWallFunction;
value uniform 0;
}

frontAndBack
{
type omegaWallFunction;
value uniform 0;
}
Motrice
{
type omegaWallFunction;
value $internalField;
}
Trailer
{
type omegaWallFunction;
value $internalField;
}
Ruota1
{
type omegaWallFunction;
value $internalField;
}
Ruota2
{
type omegaWallFunction;
value $internalField;
}
Ruota3
{
type omegaWallFunction;
value $internalField;
}
Ruota4
{
type omegaWallFunction;
value $internalField;
}
Ruota5
{
type omegaWallFunction;
value $internalField;
}
Ruota6
{
type omegaWallFunction;
value $internalField;
}
Ruota7
{
type omegaWallFunction;
value $internalField;
}
Ruota8
{
type omegaWallFunction;
value $internalField;
}
}


// ************************************************** *********************** //


/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"

frontAndBack
{
type nutkWallFunction;
value uniform 0;
}

inlet
{
type calculated;
value uniform 0;
}

symmetryPlanepatch
{
type symmetryPlane;
}

outlet
{
type nutkWallFunction;
value uniform 0;
}

lowerWall
{
type nutkWallFunction;
value uniform 0;
}

upperWall
{
type nutkWallFunction;
value uniform 0;
}


Motrice
{
type nutkWallFunction;
value uniform 0;
}
Trailer
{
type nutkWallFunction;
value uniform 0;
}
Ruota1
{
type nutkWallFunction;
value uniform 0;
}
Ruota2
{
type nutkWallFunction;
value uniform 0;
}
Ruota3
{
type nutkWallFunction;
value uniform 0;
}
Ruota4
{
type nutkWallFunction;
value uniform 0;
}
Ruota5
{
type nutkWallFunction;
value uniform 0;
}
Ruota6
{
type nutkWallFunction;
value uniform 0;
}
Ruota7
{
type nutkWallFunction;
value uniform 0;
}
Ruota8
{
type nutkWallFunction;
value uniform 0;
}
}


// ************************************************** *********************** //


/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#include "include/initialConditions"

dimensions [0 2 -2 0 0 0 0];

internalField uniform $turbulentKE;

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
//- Define inlet conditions
#include "include/fixedInlet"
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
symmetryPlanepatch
{
type symmetryPlane;
}
lowerWall
{
type kqRWallFunction;
value uniform 0;
}
upperWall
{
type kqRWallFunction;
value uniform 0;
}

frontAndBack
{
type kqRWallFunction;
value uniform 0;
}
Motrice
{
type kqRWallFunction;
value $internalField;
}
Trailer
{
type kqRWallFunction;
value $internalField;
}
Ruota1
{
type kqRWallFunction;
value $internalField;
}
Ruota2
{
type kqRWallFunction;
value $internalField;
}
Ruota3
{
type kqRWallFunction;
value $internalField;
}
Ruota4
{
type kqRWallFunction;
value $internalField;
}
Ruota5
{
type kqRWallFunction;
value $internalField;
}
Ruota6
{
type kqRWallFunction;
value $internalField;
}
Ruota7
{
type kqRWallFunction;
value $internalField;
}
Ruota8
{
type kqRWallFunction;
value $internalField;
}
}
// ************************************************** *********************** //
Andre1742 is offline   Reply With Quote

Old   August 29, 2024, 07:46
Default
  #2
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 747
Rep Power: 14
Tobermory will become famous soon enough
What is the error? What version of OpenFOAM are you running, and what solver?
Tobermory is offline   Reply With Quote

Old   August 29, 2024, 07:55
Default
  #3
New Member
 
Andrea
Join Date: Apr 2024
Posts: 18
Rep Power: 2
Andre1742 is on a distinguished road
I used simpleFoam as solver, version is 2306. Anyway, it finally worked. Can you please check if I actually satisfied the fixed walls conditions (wind tunnel walls)? Especially related to nut k and omega? Thank you!!

Here are my updated bc:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#include "include/initialConditions"

dimensions [0 2 -2 0 0 0 0];

internalField uniform $turbulentKE;

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
//- Define inlet conditions
#include "include/fixedInlet"
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
symmetryPlanepatch
{
type symmetryPlane;
}
lowerWall
{
type kqRWallFunction;
value $internalField;
}
upperWall
{
type kqRWallFunction;
value $internalField;
}

frontAndBack
{
type kqRWallFunction;
value $internalField;
}
Motrice
{
type kqRWallFunction;
value $internalField;
}
Trailer
{
type kqRWallFunction;
value $internalField;
}
Ruota1
{
type kqRWallFunction;
value $internalField;
}
Ruota2
{
type kqRWallFunction;
value $internalField;
}
Ruota3
{
type kqRWallFunction;
value $internalField;
}
Ruota4
{
type kqRWallFunction;
value $internalField;
}
Ruota5
{
type kqRWallFunction;
value $internalField;
}
Ruota6
{
type kqRWallFunction;
value $internalField;
}
Ruota7
{
type kqRWallFunction;
value $internalField;
}
Ruota8
{
type kqRWallFunction;
value $internalField;
}
}
// ************************************************** *********************** //


/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"

frontAndBack
{
type nutkWallFunction;
value uniform 0;
}

inlet
{
type calculated;
value uniform 0;
}

symmetryPlanepatch
{
type symmetryPlane;
}

outlet
{
type calculated;
value uniform 0;
}

lowerWall
{
type nutkWallFunction;
value uniform 0;
}

upperWall
{
type nutkWallFunction;
value uniform 0;
}


Motrice
{
type nutkWallFunction;
value uniform 0;
}
Trailer
{
type nutkWallFunction;
value uniform 0;
}
Ruota1
{
type nutkWallFunction;
value uniform 0;
}
Ruota2
{
type nutkWallFunction;
value uniform 0;
}
Ruota3
{
type nutkWallFunction;
value uniform 0;
}
Ruota4
{
type nutkWallFunction;
value uniform 0;
}
Ruota5
{
type nutkWallFunction;
value uniform 0;
}
Ruota6
{
type nutkWallFunction;
value uniform 0;
}
Ruota7
{
type nutkWallFunction;
value uniform 0;
}
Ruota8
{
type nutkWallFunction;
value uniform 0;
}
}


// ************************************************** *********************** //


/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object omega;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#include "include/initialConditions"

dimensions [0 0 -1 0 0 0 0];

internalField uniform $turbulentOmega;

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"

#include "include/fixedInlet"

outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}

symmetryPlanepatch
{
type symmetryPlane;
}

lowerWall
{
type omegaWallFunction;
value $internalField;
}
upperWall
{
type omegaWallFunction;
value $internalField;
}

frontAndBack
{
type omegaWallFunction;
value $internalField;
}


Motrice
{
type omegaWallFunction;
value $internalField;
}
Trailer
{
type omegaWallFunction;
value $internalField;
}
Ruota1
{
type omegaWallFunction;
value $internalField;
}
Ruota2
{
type omegaWallFunction;
value $internalField;
}
Ruota3
{
type omegaWallFunction;
value $internalField;
}
Ruota4
{
type omegaWallFunction;
value $internalField;
}
Ruota5
{
type omegaWallFunction;
value $internalField;
}
Ruota6
{
type omegaWallFunction;
value $internalField;
}
Ruota7
{
type omegaWallFunction;
value $internalField;
}
Ruota8
{
type omegaWallFunction;
value $internalField;
}
}


// ************************************************** *********************** //

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: 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 $pressure;

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"

inlet
{
type zeroGradient;
}
symmetryPlanepatch
{
type symmetryPlane;
}
outlet
{
type fixedValue;
value $internalField;
}

lowerWall
{
type zeroGradient;
}
upperWall
{
type zeroGradient;
}

frontAndBack
{
type zeroGradient;
}

Motrice
{
type zeroGradient;
}
Trailer
{
type zeroGradient;
}
Ruota1
{
type zeroGradient;
}
Ruota2
{
type zeroGradient;
}
Ruota3
{
type zeroGradient;
}
Ruota4
{
type zeroGradient;
}
Ruota5
{
type zeroGradient;
}
Ruota6
{
type zeroGradient;
}
Ruota7
{
type zeroGradient;
}
Ruota8
{
type zeroGradient;
}

}


// ************************************************** *********************** //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#include "include/initialConditions"

dimensions [0 1 -1 0 0 0 0];

internalField uniform $flowVelocity;

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"

#include "include/fixedInlet"

outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value $internalField;
}

symmetryPlanepatch
{
type symmetryPlane;
}

lowerWall
{
type noSlip;
}
upperWall
{
type noSlip;
}

frontAndBack
{
type noSlip;
}

Motrice
{
type noSlip;
}
Trailer
{
type noSlip;
}
Macchina1
{
type noSlip;
}
Macchina2
{
type noSlip;
}
Macchina3
{
type noSlip;
}
Macchina4
{
type noSlip;
}
Macchina5
{
type noSlip;
}
Macchina6
{
type noSlip;
}
Macchina7
{
type noSlip;
}

Ruota1
{
type noSlip;
}
Ruota5
{
type noSlip;
}
Ruota2
{
type noSlip;
}
Ruota6
{
type noSlip;
}
Ruota3
{
type noSlip;
}
Ruota7
{
type noSlip;
}
Ruota4
{
type noSlip;
}
Ruota8
{
type noSlip;
}

}


// ************************************************** *********************** //
Andre1742 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
My radial inflow turbine Abo Anas CFX 27 May 11, 2018 02:44
Wrong multiphase flow at rotating interface Sanyo CFX 14 February 7, 2017 18:19
Waterwheel shaped turbine inside a pipe simulation problem mshahed91 CFX 3 January 10, 2015 12:19
Radiation interface hinca CFX 15 January 26, 2014 18:11
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32


All times are GMT -4. The time now is 13:46.