DU/DT value?
Hi,
I need DU/Dt values for all grids. How can i calculate and write this parameter. Any suggestion will be appreciated. |
look in UEqn, something like
volVectorField DuDt= fvc::ddt(U) +fvc::div(phi,U) |
Thanks Nima,
When i switch from Euler to CrancNicholson in fvScheme, ddt0(U) and ddt0(phi) are Written in time folders. Now, my questions are: 1- is this value equal to D/DT(U)? if no How it can be calculated. 2- Is it any way to write it with Euler ddt scheme? Regards. |
Here it is:
Code:
DDtU = Best, |
Dear Alberto,
Thanks for your answer. Is it possible to describe more. Where should i write this code? What is steps for writing process in time folders? Is it need to define DDT in folder 0? I am running LES with pisoFoam. Regards. |
Quote:
Take a look at createFields.H, where other fields are created, and do something similar for DDtU. Then update the field at the end of the iteration, before runTime.write(). You do not need to do anything in 0 if you specify NO_READ in the IOobject. Best, |
Quote:
it is my first openFoam programming and it was the cause of my silly questions. ;) Now i have a scientific question. first i describe my works: 1- Copying pisoFoam to new folder pisoFoam2. 2-Adding below code next of U and P IOobject of creatFields.H: Code:
volVectorField DDtU Code:
DDtU = Code:
EXE = $(FOAM_APPBIN)/pisoFoam2 After this steps and running a case with pisoFoam2 this error is displayed: HTML Code:
Reading field p Regards. |
sorry double post :)
|
hi its because you are using the wrong constructor
look for example at the createfields.H from the coalChemistryFoam Solver Code:
DimensionedField<scalar, volMesh> kappa gregor |
Hi and thanks Gregor
I didn't find its format for vevtor DDtU with dimension [0 1 -2 0 0 0]. Do you know it? Another question for Alberto: Quote:
|
try dimensionedScalar("ddtU", dimVelocity/dimTime/dimTime, 0.0)
edit: well obviously it has to be vector::zero instead of 0.0 |
volVectorField DDtU
( IOobject ( "DDtU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedVector("DDtU",dimensionSet(0,1,-2,0,0,0),vector::zero) ); ) |
Quote:
The problem is solved by: Code:
volVectorField DDtU Quote:
|
no its not!!!!!! it is just DU/DT not D(rho U )/DT
|
DDtU = fvc::ddt(U) + fvc::div(phi, U) - fvc::div(phi)*U
As it is stated in User guide phi=rho*U So it has problem in dimension. DDtU=>m/s2 ddt(U)=>m/s2 div(phi,U)=div((rho*U)U)=> kg/(m2s2) div(phi)*U=> kg/(m2s2) |
Quote:
http://www.openfoam.com/docs/user/fv...20-1120004.4.5 But phi which is written in time folders has this dimension: [0 3 -1 0 0 0 0] And with this dimension it has dimension problem yet. div(phi,U)=> m3/s2 :confused: |
phi is not rho*U , it is U & sf()
sf() : surface vector so U (m/s) and sf (m^2) so phi is (m^3/s), ok? |
Ok, you mean it is not equal to what user guide wrote for phi. Maybe this is another phi.
But what is your idea about dimensional problem of DDtU? |
whats wrong with m/s^2 ?
|
DDtU=>m/s2
ddt(U)=>m/s2 div(phi,U)=> m3/(s2) div(phi)*U=> m3/(s2) All of these four phrases should have same dimension, shouldn't they? |
All times are GMT -4. The time now is 16:57. |