|
[Sponsors] |
August 26, 2019, 02:19 |
Custom boundary condition in OpenFOAM
|
#1 |
New Member
Florida
Join Date: Feb 2018
Location: Florida
Posts: 12
Rep Power: 8 |
Hi FOamers,
I am currently trying to write a boundary condition which reads like this : q = −ρ(w · v) − ρ wnvn − μ(n · ∇wn) − ω1ρvnvn (q is the variable which needs a patch update.) I'm having trouble including the effective viscosity (which contains the molecular and turbulent viscosity) in the patch update. These are the expression I have used for the member functions in the boundary condition code : const fvsPatchField<scalar>& phip = patch().lookupPatchField<surfaceScalarField, scalar>("phi"); const fvsPatchField<scalar>& phiap = patch().lookupPatchField<surfaceScalarField, scalar>("phia"); const fvPatchField<vector>& Up = patch().lookupPatchField<volVectorField, vector>("U"); const fvPatchField<vector>& Uap = patch().lookupPatchField<volVectorField, vector>("Ua"); const fvPatchField<scalar>& Tp = patch().lookupPatchField<volScalarField, scalar>("T"); scalarField nueff = rasModel.nuEff()().boundaryField() The last line is where I'm having the error as to how to access the nu_effective value from the solution itself like I did for the other quantities. Please let me know what you think. Thanks, Shinjan |
|
August 26, 2019, 06:30 |
|
#2 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Hi!
Just a guess, sorry if I'm wrong, but this should be fine for any turbulence model not just RAS: turbulence->nuEff(); But maybe you will have to look up for "turbulence" somehow in the BC. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wind turbine simulation | Saturn | CFX | 60 | July 17, 2024 06:45 |
Cyclic boundary condition in foam-extend 4.0 | rellumeister | OpenFOAM Pre-Processing | 2 | March 3, 2020 09:03 |
OpenFOAM 4.0 Released | CFDFoundation | OpenFOAM Announcements from OpenFOAM Foundation | 2 | October 6, 2017 06:40 |
OpenFOAM v3.0+ ?? | SBusch | OpenFOAM | 22 | December 26, 2016 15:24 |
Low Mixing time Problem | Mavier | CFX | 5 | April 29, 2013 01:00 |