|
[Sponsors] |
October 16, 2006, 01:17 |
Hello All,
I am wondering i
|
#1 |
Member
Shaun Cooper
Join Date: Mar 2009
Posts: 54
Rep Power: 17 |
Hello All,
I am wondering if it is possible to get access to the spatial gradient constituents of the divergence operator. What I really want is to be able to look at the three seperate constituents of the divergence of the velocity (i.e du/dx, dv/dy, dw/dz). How can I access these so that I can print these fields out at each time step? Thanks in advance, Shaun |
|
October 16, 2006, 01:26 |
Calculate fvc::grad(U) and tak
|
#2 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
Calculate fvc::grad(U) and take the xx, yy and zz component.
Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
October 16, 2006, 01:52 |
Thanks for the advice thus far
|
#3 |
Member
Shaun Cooper
Join Date: Mar 2009
Posts: 54
Rep Power: 17 |
Thanks for the advice thus far however I have the following problem.
I have created a field called gradU that is a volTensorField. It is written out at each time step. From this field I was then going to take the individual constituents I require. For example I created a volScalar field called streamwise and at the end of the application (just before runTime.write(); at the end of the time step) I have written the following: streamwise = gradU.xx(); When I go to compile this I receive the following error: newThermSolver.C:132: error: 'struct Foam::volTensorField' has no member named 'xx' I am not sure what I have done wrong. Can someone help me with this error? This looks like an example that can be found on pg P-23 of the programmers guide. The tensorfield gradU does write out at each time-step and does appear to work correctly. Thanks, Shaun |
|
October 16, 2006, 03:05 |
I am not sure what I have done
|
#4 | |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
Quote:
OK, enough of that - I think you've got the message :-) gradU.component(tensor::XX); Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
||
October 16, 2006, 05:20 |
Sorry, Sorry, Sorry, Sorry.
|
#5 |
Member
Shaun Cooper
Join Date: Mar 2009
Posts: 54
Rep Power: 17 |
Sorry, Sorry, Sorry, Sorry.
Thanks for you help! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
gradients | cirilo | Siemens | 1 | March 11, 2006 17:59 |
Gradients... | Question.. | Main CFD Forum | 0 | June 29, 2005 14:03 |
Gradients. | J. Ca | Main CFD Forum | 4 | February 25, 2005 15:11 |
GRADIENTS | Luca | FLUENT | 2 | January 28, 2005 11:43 |
Specifying gradients | S Roy | Phoenics | 0 | April 18, 2002 02:41 |