|
[Sponsors] |
Problems on applying pressure outlet boundary for open source cfd code |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 11, 2017, 22:26 |
Problems on applying pressure outlet boundary for open source cfd code
|
#1 |
New Member
Green
Join Date: Apr 2016
Posts: 27
Rep Power: 10 |
Is there anyone writing cfd codes? I wrote the pressure outlet boundary for dolfyn(an open source cfd code) but it just got divergence. The mass conservation equations could not get convergence. Is there any tricks for this problem? The theory guide is the book by Ferziger Peric--"Computational Methods for Fluid Dynamics". Thank you!
https://www.dolfyn.net/index_en.html |
|
April 12, 2017, 01:05 |
|
#2 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,290
Rep Power: 34 |
Quote:
Cases with pressure outlet also can diverge in commercial code too. So if your calculation diverged on off then i am not sure what your question is. If your question is that it diverged all the time, then makes sense. There is nothing special in pressure-outlet condition. In fact it is preferred condition because it adds Dirichlet condition and makes linear system converge faster. I have written iNavier in past and now writing wildkatze FVUS and pressure outlet works good. Don't have complain so far. |
||
April 12, 2017, 01:59 |
|
#3 | |
New Member
Green
Join Date: Apr 2016
Posts: 27
Rep Power: 10 |
Quote:
|
||
April 12, 2017, 22:35 |
|
#4 | |
New Member
Green
Join Date: Apr 2016
Posts: 27
Rep Power: 10 |
Quote:
|
||
April 13, 2017, 08:14 |
|
#5 |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,290
Rep Power: 34 |
commercial solvers also add dynamic head in case of reversed flow. This discourages reversed flow that can make solver instable. This is optional in FVUS (and in starccm), in fluent I am not sure if you can switch it off but by default it is on there.
Here is code that does in FVUS wildkatze Code:
void PBasedFlowModelEquation:: BoundaryConditionTerm:: addDynamicHead( FVFaces& fvFaces, PhaseContinuum& phase, StorageAndMemoryManager& stManBnd, ObjectOptions& objOptions) { StorageAndMemoryManager * stMan = getSimulation().getStorageAndMemoryManager( phase, getFiniteVolume()); double *ax = fvFaces.areaX() ; double *ay = fvFaces.areaY() ; double *az = fvFaces.areaZ() ; double *xVel = stMan->getDoubleVar("x-velocity"); double *yVel = stMan->getDoubleVar("y-velocity"); double *zVel = stMan->getDoubleVar("z-velocity"); double *pres = stMan->getDoubleVar("pressure" ); double *density = stMan->getDoubleVar("eff-density"); int const nfaces = fvFaces.size (); int const *CL = fvFaces.cellsLeft (); int const *CR = fvFaces.cellsRight(); int cl = 0; int cr = 0; for (int f = 1; f <= nfaces; f++) { cl = CL[f]; cr = CR[f]; double AdotVel = xVel[cr] * ax[f] + yVel[cr] * ay[f] + zVel[cr] * az[f]; if (AdotVel < 0.0) { pres[ cr ] -= 0.5*density[ cr ]*( xVel[cr] * xVel[cr] + yVel[cr] * yVel[cr] + zVel[cr] * zVel[cr] ); } } } |
|
Tags |
cfd codes, dolfyn, finite volume method, pressure boundaries |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFD analaysis of Pelton turbine | amodpanthee | CFX | 31 | April 19, 2018 19:02 |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 17:02 |
Problem compiling a custom Lagrangian library | brbbhatti | OpenFOAM Programming & Development | 2 | July 7, 2014 12:32 |
friction forces icoFoam | ofslcm | OpenFOAM | 3 | April 7, 2012 11:57 |
Setting outlet Pressure boundary condition using CAFFA code | Mukund Pondkule | Main CFD Forum | 0 | March 16, 2011 04:23 |