|
[Sponsors] |
November 26, 2013, 09:46 |
how to use the fixedShearStress BC?
|
#1 |
New Member
zdong
Join Date: Aug 2011
Posts: 15
Rep Power: 15 |
when try to use the fixedShearStress bc at the top boundary of my domain for U to simulate the atmosphere boundary layer, OpenFOAM gave me an error.
then I changed the type of 0/U at the top boundary to dummy to see the available bc types, there was no fixedshearStress keywords in the output log at all, however, i'm sure my OpenFOAM 2.2.0 was installed correctly and it got the source and head files for fixedShearStress BC class in the right path. then i searched this forum , there were some related posts from here: http://www.cfd-online.com/Forums/ope...y-layer-2.html it's like this : surface { type fixedShearStress; tau (0.0001 0 0); } but nothing was helpful to my 2.2.0 OpenFOAM. could any one help me out of this? Thanks in advance. |
|
November 27, 2013, 20:41 |
|
#2 |
New Member
zdong
Join Date: Aug 2011
Posts: 15
Rep Power: 15 |
what's going on ? waiting for all of your reply
|
|
April 9, 2014, 20:49 |
|
#3 |
Member
Join Date: Jul 2010
Posts: 52
Rep Power: 16 |
Hi zdong;
It might be a bit to late to answer your questions but…. To use the fixedShearStress boundary condition you need to add this on your controlDict: libs("libturbulenceDerivedFvPatchFields.so") Just be aware that the code is not the same as in OFv1.7.x. I just had a quick look at the differences between OFv2.2.2 and and OFv1.7.x. But in the new version it requires "rho" as an input. So I assume there are other differences. Also, now the path is: src/turbulenceModels/derivedFvPatchFields while before it was: src/turbulenceModels/incompressible/RAS/derivedFvPatchFields Hope it helps, Mary |
|
February 16, 2017, 17:11 |
error with fixedShearStress
|
#4 |
New Member
Jie (Jay) Zhang
Join Date: Sep 2010
Location: Phoenix, AZ, U.S.
Posts: 28
Rep Power: 16 |
I am trying to use the fixedShearStress B.C with pisoFoam. I searched all the information I can find and did it in the way below (Note that the OpenFOAM version I used is 2.2):
1) In the file 0/U: surface { type fixedShearStress; tau (0.037 0 0); value uniform (0 0 0); } (Note: rho and phi are actually not necessary) 2) I included libs("libturbulenceDerivedFvPatchFields.so") in the controlDict However I got the following error: Code:
Starting time loop Time = 1 Courant Number mean: 0.0125543 max: 0.0558635 #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigSegv::sigHandler(int) at ??:? #2 at sigaction.c:? #3 Foam::multiply(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:? #4 Foam::operator*(Foam::UList<double> const&, Foam::UList<double> const&) at ??:? #5 Foam::fixedShearStressFvPatchVectorField::updateCoeffs() at ??:? #6 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::updateCoeffs() at ??:? #7 Foam::fvMatrix<Foam::Vector<double> >::fvMatrix(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) at ??:? #8 Foam::fv::gaussLaplacianScheme<Foam::Vector<double>, double>::fvmLaplacianUncorrected(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) at ??:? #9 Foam::fv::gaussLaplacianScheme<Foam::Vector<double>, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) at ??:? #10 Foam::fv::laplacianScheme<Foam::Vector<double>, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) at ??:? #11 Foam::tmp<Foam::fvMatrix<Foam::Vector<double> > > Foam::fvm::laplacian<Foam::Vector<double>, double>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&) at ??:? #12 Foam::incompressible::RASModels::kEpsilon::divDevReff(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&) const at ??:? #13 at ??:? #14 __libc_start_main at ??:? #15 at ??:? Segmentation fault I tried different turbulence models, like kEpsilon and kOmegaSST. It gives the same error. Comments and insights are greatly appreciated. Thanks! Jay |
|
September 26, 2017, 06:14 |
|
#5 | |
Member
Robert Ong
Join Date: Aug 2010
Posts: 86
Rep Power: 16 |
Quote:
I'm having a similar problem. Did you manage to solve it? Thanks and regards Robert |
||
September 26, 2017, 13:00 |
|
#6 |
New Member
Jie (Jay) Zhang
Join Date: Sep 2010
Location: Phoenix, AZ, U.S.
Posts: 28
Rep Power: 16 |
Hi Robert,
No, I gave up. Instead, I fixed nut and used the following fixed gradient for U. surface { type directionMixed; refValue uniform (0 0 0); refGradient uniform (0.017 0 0); valueFraction uniform (0 0 0 0 0 1); value uniform (0.017 0 0); } |
|
September 26, 2017, 21:09 |
|
#7 |
Member
Robert Ong
Join Date: Aug 2010
Posts: 86
Rep Power: 16 |
Hi Jay,
Thanks for sharing the alternative workaround. I managed to run this fixedShearStress in OF.3.0.x but not in 3.0.1, so I'm guessing there is a bug (as reported here https://bugs.openfoam.org/view.php?id=2020). I think this bug is resolved in the newer version (>3.0.x). Anyway, may I ask what is the type of your top BC (i.e. patch/wall/empty/symmetryPlane) if we impose the shear stress mentioned by Richards&Hoxey? Also, I'm guessing the choice of value is quite important here (unlike the initialisation value). I calculated mine as \tau = \rho*\nu_T*\frac{\del u}{\del z}, where \nu_T=u_{star}*\kappa*z and \frac{\del u}{\del z}=u_{star}/(\kappa*z). Hence \tau=\rho*u_{star}^2. Is this correct? Thanks and regards, Robert |
|
September 27, 2017, 11:52 |
|
#8 | |
New Member
Jie (Jay) Zhang
Join Date: Sep 2010
Location: Phoenix, AZ, U.S.
Posts: 28
Rep Power: 16 |
Quote:
I used patch for the top BC. I think it is the only choice if you want to use fixedStress for U. Correct me if I am wrong. The formula you mentioned is correct, see https://en.wikipedia.org/wiki/Shear_velocity But I am not clear about what the choice of value means here. Do you mean the choice of value for tau? In my previous case, the tau was determined by wind above the top BC. Jay |
||
September 27, 2017, 21:56 |
|
#9 |
Member
Robert Ong
Join Date: Aug 2010
Posts: 86
Rep Power: 16 |
Hi Jay,
My aim (which also maybe your aim) is to impose a constant shear stress at the top (i.e. shear driven flow), as mentioned by Richards&Hoxey and Sullivan et al, (2010?). I think both fixedShearStress and your method (combined imposed fixed dU/dn and nut) is essentially the same, as they imposed a constant shear stress at the top. Would be interesting to see the results comparison of these methods. Thanks Robert |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Atmospheric boundary layer | Daniele111 | OpenFOAM Running, Solving & CFD | 50 | November 3, 2023 04:22 |