Q: How to access turbulent production term G from TKE in scalarCodedSource
1 Attachment(s)
Hello,
I would like to implement a source term into k-epsilon model in a given location using the scalar coded source in fvOptions. I implemented the k source and it works fine, but the epsilon source term need the production term of the TKE, G. How can I get this term into the equation? The source term is given in the figure attached herewith. Attachment 87909 Thank you. |
Is this field natively available by the solver?
You can check it by running a "dummy" functionObject that will give you an error and print all available fields: Code:
FIELDSAVAILABLE If you can, you may access it with something like Code:
mesh().lookupObject<volScalarField>("FIELD"); If you can't, then you might need to re-write it from the other available fields |
Quote:
Hello, thanks for the reply, I checked the term is not listed in the available field list. the TKE production term G is defined in the KEps model as; It is defined in the .C fine as Code:
const volScalarField::Internal G(this->GName(), nut()*GbyNu); Code:
// Turbulent kinetic energy equation |
Hmm so this is harder. I'd try recreating this expression:
Code:
tgradU().v() && dev(twoSymm(tgradU().v())) * nut() As alternatives you could edit the code to make this variable accessible, or use swak4Foam that usually have access to more fields. Not sure how to use it for fvOptions though. |
You are right Julio, but most of those terms (tgradU(), twoSymm(tgradU().v())) will not be stored on the registry, so you'll have to recreate them from the velocity field. Just follow the coding in the kEpsilon model, and you should be fine.
|
All times are GMT -4. The time now is 01:22. |