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

sonicFoam BC problem

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 13, 2018, 05:38
Post sonicFoam BC problem
  #1
New Member
 
elcin
Join Date: Dec 2017
Posts: 1
Rep Power: 0
elcinyal is on a distinguished road
Hello everyone,

I have a supersonic cavity problem to analyze and I am using sonicFoam. Also I need to use velocity, k and omega inlet profiles which are results of a flat plate analysis in order to start with already grown turbulent boundary layer.

I set the BC's according to my literature research and OpenFOAM tutorials. However for all cases I got unexpected results or OpenFOAM gave me error after some time and did not solve it.

for alphat and nut
inlet, outlet and freestream calculated 0, walls are compressible::alphatWallFunction and compressible::nutWallFunction.

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

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

internalField uniform (0 0 0);

boundaryField
{
INLET
{
type fixedValue;
value nonuniform List<vector>
251
(
(2.50E-05 9.86 0)
(7.83E-05 165.975 0)
(0.000138422 212.25 0)
(0.000206417 242.94 0)
(0.000283252 257.33 0)
(0.000370074 277.235 0)
(0.000468184 289.62 0)
(0.000579048 295.82 0)
(0.000704324 308.13 0)
(0.000845886 320.41 0)
(0.00100585 326.53 0)
(0.00118661 332.65 0)
(0.00139087 344.79 0)
(0.00162169 351.42 0)
(0.0018825 358.05 0)
(0.00217723 372.49 0)
(0.00251027 380.705 0)
(0.00286937 388.92 0)
(0.00323419 399.31 0)
(0.00359902 409.7 0)
(0.00396384 412.193 0)
(0.00432867 423.83 0)
(0.0046935 437.96 0)
(0.00505832 439.973 0)
(0.00542315 440.98 0)
(0.00578797 444 0)
(0.0061528 444 0)
(0.00651762 444 0)
(0.00688245 444 0)
(0.00724728 444 0)
(0.0076121 444 0)
(0.00797693 444 0)
(0.00834175 444 0)
(0.00870658 444 0)
(0.00907141 444 0)
(0.00943623 444 0)
(0.00980106 444 0)
(0.0101659 444 0)
(0.0105307 444 0)
(0.0108955 444 0)
(0.0112604 444 0)
(0.0116252 444 0)
(0.01199 444 0)
(0.0123548 444 0)
(0.0127197 444 0)
(0.0130845 444 0)
(0.0134493 444 0)
(0.0138141 444 0)
(0.014179 444 0)
(0.0145438 444 0)
(0.0149086 444 0)
(0.0152734 444 0)
(0.0156383 444 0)
(0.0160031 444 0)
(0.0163679 444 0)
(0.0167327 444 0)
(0.0170976 444 0)
(0.0174624 444 0)
(0.0178272 444 0)
(0.0181921 444 0)
(0.0185569 444 0)
(0.0189217 444 0)
(0.0192865 444 0)
(0.0196514 444 0)
(0.0200162 444 0)
(0.020381 444 0)
(0.0207458 444 0)
(0.0211107 444 0)
(0.0214755 444 0)
(0.0218403 444 0)
(0.0222051 444 0)
(0.02257 444 0)
(0.0229348 444 0)
(0.0232996 444 0)
(0.0236644 444 0)
(0.0240293 444 0)
(0.0243941 444 0)
(0.0247589 444 0)
(0.0251237 444 0)
(0.0254886 444 0)
(0.0258534 444 0)
(0.0262182 444 0)
(0.026583 444 0)
(0.0269479 444 0)
(0.0273127 444 0)
(0.0276775 444 0)
(0.0280423 444 0)
(0.0284072 444 0)
(0.028772 444 0)
(0.0291368 444 0)
(0.0295017 444 0)
(0.0298665 444 0)
(0.0302313 444 0)
(0.0305961 444 0)
(0.030961 444 0)
(0.0313258 444 0)
(0.0316906 444 0)
(0.0320554 444 0)
(0.0324203 444 0)
(0.0327851 444 0)
(0.0331499 444 0)
(0.0335147 444 0)
(0.0338796 444 0)
(0.0342444 444 0)
(0.0346092 444 0)
(0.034974 444 0)
(0.0353389 444 0)
(0.0357037 444 0)
(0.0360685 444 0)
(0.0364333 444 0)
(0.0367982 444 0)
(0.037163 444 0)
(0.0375278 444 0)
(0.0378926 444 0)
(0.0382575 444 0)
(0.0386223 444 0)
(0.0389871 444 0)
(0.0393519 444 0)
(0.0397168 444 0)
(0.0400816 444 0)
(0.0404464 444 0)
(0.0408113 444 0)
(0.0411761 444 0)
(0.0415409 444 0)
(0.0419057 444 0)
(0.0422706 444 0)
(0.0426354 444 0)
(0.0430002 444 0)
(0.043365 444 0)
(0.0437299 444 0)
(0.0440947 444 0)
(0.0444595 444 0)
(0.0448243 444 0)
(0.0451892 444 0)
(0.045554 444 0)
(0.0459188 444 0)
(0.0462836 444 0)
(0.0466485 444 0)
(0.0470133 444 0)
(0.0473781 444 0)
(0.0477429 444 0)
(0.0481078 444 0)
(0.0484726 444 0)
(0.0488374 444 0)
(0.0492022 444 0)
(0.0495671 444 0)
(0.0499319 444 0)
(0.0502967 444 0)
(0.0506616 444 0)
(0.0510264 444 0)
(0.0513912 444 0)
(0.051756 444 0)
(0.0521209 444 0)
(0.0524857 444 0)
(0.0528505 444 0)
(0.0532153 444 0)
(0.0535802 444 0)
(0.053945 444 0)
(0.0543098 444 0)
(0.0546746 444 0)
(0.0550395 444 0)
(0.0554043 444 0)
(0.0557691 444 0)
(0.0561339 444 0)
(0.0564988 444 0)
(0.0568636 444 0)
(0.0572284 444 0)
(0.0575932 444 0)
(0.0579581 444 0)
(0.0583229 444 0)
(0.0586877 444 0)
(0.0590525 444 0)
(0.0594174 444 0)
(0.0597822 444 0)
(0.060147 444 0)
(0.0605118 444 0)
(0.0608767 444 0)
(0.0612415 444 0)
(0.0616063 444 0)
(0.0619712 444 0)
(0.062336 444 0)
(0.0627008 444 0)
(0.0630656 444 0)
(0.0634305 444 0)
(0.0637953 444 0)
(0.0641601 444 0)
(0.0645249 444 0)
(0.0648898 444 0)
(0.0652546 444 0)
(0.0656194 444 0)
(0.0659842 444 0)
(0.0663491 444 0)
(0.0667139 444 0)
(0.0670787 444 0)
(0.0674435 444 0)
(0.0678084 444 0)
(0.0681732 444 0)
(0.068538 444 0)
(0.0689028 444 0)
(0.0692677 444 0)
(0.0696325 444 0)
(0.0699973 444 0)
(0.0703621 444 0)
(0.070727 444 0)
(0.0710918 444 0)
(0.0714566 444 0)
(0.0718214 444 0)
(0.0721863 444 0)
(0.0725511 444 0)
(0.0729159 444 0)
(0.0732808 444 0)
(0.0736456 444 0)
(0.0740104 444 0)
(0.0743752 444 0)
(0.0747401 444 0)
(0.0751049 444 0)
(0.0754697 444 0)
(0.0758345 444 0)
(0.0761994 444 0)
(0.0765642 444 0)
(0.076929 444 0)
(0.0772938 444 0)
(0.0776587 444 0)
(0.0780235 444 0)
(0.0783883 444 0)
(0.0787531 444 0)
(0.079118 444 0)
(0.0794828 444 0)
(0.0798476 444 0)
(0.0802124 444 0)
(0.0805773 444 0)
(0.0809421 444 0)
(0.0813069 444 0)
(0.0816717 444 0)
(0.0820366 444 0)
(0.0824014 444 0)
(0.0827662 444 0)
(0.0831311 444 0)
(0.0834959 444 0)
(0.0838607 444 0)
(0.0842255 444 0)
(0.0845904 444 0)
(0.0849552 444 0)
(0.08532 444 0)
(0.0856848 444 0)
(0.0860497 444 0)
(0.0864145 444 0)
(0.0867793 444 0)
(0.0871441 444 0)
(0.087509 444 0)
(0.0878738 444 0)
)
;

}

OUTLET
{
type inletOutlet;
value uniform (444 0 0);
inletValue uniform (444 0 0);
}
FREESTREAM
{
type inletOutlet;
value uniform (444 0 0);
inletValue uniform (444 0 0);
}

WALL
{
type noSlip;
}
TE
{
type noSlip;
}
LE
{
type noSlip;
}
BOTTOMWALL
{
type noSlip;
}

frontAndBackPlanes
{
type empty;
}
}

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

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

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

internalField uniform 17893;

boundaryField
{
INLET
{
type fixedValue;
value uniform 17894;
}

OUTLET
{
type waveTransmissive;
field p;
gamma 1.405;
psi thermosi;
fieldInf 17894;
lInf 1;
value uniform 17894;
}

FREESTREAM
{
type waveTransmissive;
field p;
gamma 1.405;
psi thermosi;
fieldInf 17894;
lInf 1;
value uniform 17894;
}

WALL
{
type zeroGradient;
}

TE
{
type zeroGradient;
}

LE
{
type zeroGradient;
}

BOTTOMWALL
{
type zeroGradient;
}

frontAndBackPlanes
{
type empty;
}
}

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

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

dimensions [0 0 0 1 0 0 0];

internalField uniform 218;

boundaryField
{
INLET
{
type fixedValue;
value uniform 218;
}

OUTLET
{
type inletOutlet;
value uniform 218;
inletValue uniform 218;
}

FREESTREAM
{
type inletOutlet;
value uniform 218;
inletValue uniform 218;
}

WALL
{
type fixedValue;
value uniform 304.8;
}

TE
{
type fixedValue;
value uniform 304.8;
}

LE
{
type fixedValue;
value uniform 304.8;
}

BOTTOMWALL
{
type fixedValue;
value uniform 304.8;
}

frontAndBackPlanes
{
type empty;
}

}

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


Do ypu have any idea what would be the problem?

Last edited by elcinyal; March 13, 2018 at 07:22.
elcinyal is offline   Reply With Quote

Old   January 29, 2019, 23:14
Default
  #2
Member
 
madz
Join Date: Sep 2018
Posts: 34
Rep Power: 7
maddy11 is on a distinguished road
Hi! Were you able to solve the problem? Im having same issues here! Im simulating supersonic cavity. Is sonicFoam better than rhoCentralFoam?
maddy11 is offline   Reply With Quote

Old   February 12, 2019, 01:21
Default
  #3
New Member
 
Anjay
Join Date: Feb 2019
Posts: 14
Rep Power: 7
AlphaSierra is on a distinguished road
Hey Elcin,

Have you tried reducing your Courant number? That may well be the issue. Try reducing your deltaT as well.

Anjay
AlphaSierra is offline   Reply With Quote

Old   February 12, 2019, 01:27
Default
  #4
New Member
 
Anjay
Join Date: Feb 2019
Posts: 14
Rep Power: 7
AlphaSierra is on a distinguished road
Hey Maddy,

Quote:
Originally Posted by maddy11 View Post
Hi! Were you able to solve the problem? Im having same issues here! Im simulating supersonic cavity. Is sonicFoam better than rhoCentralFoam?
This depends on the case you're simulating. You can read up about the solvers and how they're different. Try going through the source code to better understand the differences between the solvers as well. Generally, sonicFoam is used when there is transonic flow. Also, rhoCentralFoam uses a central upwind scheme. Keep that in mind as well. Hope this helps.

Anjay
AlphaSierra is offline   Reply With Quote

Old   February 13, 2019, 01:40
Default
  #5
Member
 
madz
Join Date: Sep 2018
Posts: 34
Rep Power: 7
maddy11 is on a distinguished road
Hi Anjay,

Can you please tell me what are central upwind schemes? And rhoCentralFoam is better for supersonic flow right?
maddy11 is offline   Reply With Quote

Old   February 13, 2019, 02:59
Default
  #6
New Member
 
Anjay
Join Date: Feb 2019
Posts: 14
Rep Power: 7
AlphaSierra is on a distinguished road
Hey Maddy,

When to use upwind or central differencing schemes?
https://en.wikipedia.org/wiki/Upwind_scheme

See if this helps for understanding what central upwind schemes mean.
Also, rhoCentralFoam has been shown to work well for supersonic flows, even if there are subsonic regions present in the flow.

Anjay
AlphaSierra 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
conduction problem venkataramana OpenFOAM 3 December 1, 2013 07:30
UDF compiling problem Wouter Fluent UDF and Scheme Programming 6 June 6, 2012 04:43
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13
Is this problem well posed? Thomas P. Abraham Main CFD Forum 5 September 8, 1999 14:52


All times are GMT -4. The time now is 07:44.