Hello All,
I am wondering i
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 |
Calculate fvc::grad(U) and tak
Calculate fvc::grad(U) and take the xx, yy and zz component.
Hrv |
Thanks for the advice thus far
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 |
I am not sure what I have done
Quote:
OK, enough of that - I think you've got the message :-) gradU.component(tensor::XX); Hrv |
Sorry, Sorry, Sorry, Sorry.
Sorry, Sorry, Sorry, Sorry.
Thanks for you help! |
All times are GMT -4. The time now is 19:49. |