|
[Sponsors] |
October 19, 2009, 09:54 |
How to get omega fields ?
|
#1 |
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17 |
Hi,
I am using OpenFOAM-1.5. I am doing RANS k-omega SST computations with a custom solver derived from simpleFoam and would like to manipulate fields of omega. In createFields.H, there is Code:
autoPtr<incompressible::RASModel> turbulence ( incompressible::RASModel::New(U, phi, laminarTransport) ); I also found the declaration of New() which did not help me much: Code:
//- Return a reference to the selected turbulence model static autoPtr<RASModel> New ( const volVectorField& U, const surfaceScalarField& phi, transportModel& transport ); |
|
October 19, 2009, 12:34 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
mesh.lookupObject<volScalarField>("omega") Have a look at Doxygen to find out what that actually does |
||
October 19, 2009, 15:20 |
|
#3 |
Senior Member
John Deas
Join Date: Mar 2009
Posts: 160
Rep Power: 17 |
Get it. Didn't know it could be that simple.
Thanks ! |
|
March 20, 2012, 06:59 |
|
#4 | |
Senior Member
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 17 |
Hi,
I have a question/problem accessing and modifying k and omega. Using the above mentioned as simply taking Quote:
Any hints? |
||
March 20, 2012, 08:40 |
|
#5 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
||
March 20, 2012, 09:09 |
|
#6 | ||
Senior Member
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 17 |
Hello Bernhard,
I'm sorry to say that I'm not that familiar with c++ and references/pointers. I tried to reference the object in the following ways: Quote:
Quote:
I know that I definitely have to improve my c++ skills, but could you nevertheless give me the correct referencing syntax here? Thanks, Arne |
|||
March 20, 2012, 09:58 |
|
#7 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
My last answer (about const_cast) was meant to be in answer of this message. I relocated it Last edited by gschaider; March 20, 2012 at 10:56. Reason: Answered wrong message |
||
March 20, 2012, 11:07 |
|
#8 |
Senior Member
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 17 |
Thanks, I already got the casting working and am currently trying to understand a bit more about it - esp. the "unwanted behavior" of a const_cast.
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Incompatible fields for operation divphi Ub | vvqf | OpenFOAM Running, Solving & CFD | 4 | April 4, 2018 04:28 |
Use of k omega turbulence model | john_w | OpenFOAM Running, Solving & CFD | 2 | September 22, 2009 06:15 |
Wall function implementation K Omega SSt | cbarry | OpenFOAM | 3 | August 18, 2009 11:09 |
PostChannel | maka | OpenFOAM Post-Processing | 5 | July 22, 2009 10:15 |
Airfoil with k Omega | hoochie | OpenFOAM Running, Solving & CFD | 0 | July 3, 2007 09:10 |