|
[Sponsors] |
Divergence of icoFoam with custom boundary condtion in openFOAM3.1 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 16, 2019, 05:16 |
Divergence of icoFoam with custom boundary condtion in openFOAM3.1
|
#1 |
New Member
Join Date: Apr 2019
Location: China,beijing
Posts: 4
Rep Power: 7 |
Hi foamers:
I’m writing a new boundary condition in openFOAM3.1. I want to use it to calculate the slip velocity on the wall. The new BC is a little different from partialSlip, for I define different slip length on each direction: streamSlip, spanSlip. I chose the parabolic BC which is base on the fixedValue to rewite my own BC, because I can’t understand the partialSlip! I have compiled my BC and applied it to a simple case but failed. The case ran only 7 time step and soon diverged. Below is my code in updateCoeffs(), the streamWise and spanWise are the slip-direction: void slipLengthFvPatchVectorField::updateCoeffs() { if (updated()) { return; } const fvMesh& mesh = patch().boundaryMesh().mesh(); label patchID = mesh.boundaryMesh().findPatchID("SLIP"); const volVectorField& U = this->db().objectRegistry::lookupObject<volVectorFiel d> ("U"); const fvPatchVectorField& Uf = U.boundaryField()[patchID]; vectorField gradU = Uf.snGrad(); vectorField UStream = (gradU & streamWise_)*(streamWise_)*streamSlip_/(mag(streamWise_)*mag(streamWise_)); vectorField USpan = (gradU & spanWise_)*(spanWise_)*spanSlip_/(mag(spanWise_)*mag(spanWise_)); operator==(UStream + USpan); fixedValueFvPatchField<vector>::updateCoeffs(); } The size of the computational domain is 0.05*0.02*0.001m in x, y and z direction respectively. There are 201, 21 and 101 uniform grids in each direction. The icoFoam was used to solve the case. Any suggestion will be helpful! Thanks for your attention! Regards |
|
June 17, 2019, 00:06 |
when i reduce slip length
|
#2 |
New Member
Join Date: Apr 2019
Location: China,beijing
Posts: 4
Rep Power: 7 |
When I deleted the mag(*) in the code and reduced the slip length to 1e-05m, the case ran without problem. But when i give it a larger slip length like 1e-04m, it diverged as before.
|
|
Tags |
boundary conditions |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foam::error::PrintStack | almir | OpenFOAM Running, Solving & CFD | 92 | May 21, 2024 08:56 |
My radial inflow turbine | Abo Anas | CFX | 27 | May 11, 2018 02:44 |
Out File does not show Imbalance in % | Mmaragann | CFX | 5 | January 20, 2017 11:20 |
Multiphase flow - incorrect velocity on inlet | Mike_Tom | CFX | 6 | September 29, 2016 02:27 |
Basic Nozzle-Expander Design | karmavatar | CFX | 20 | March 20, 2016 09:44 |