|
[Sponsors] |
June 4, 2011, 04:27 |
|
#3 |
Senior Member
|
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. |
|
June 4, 2011, 09:53 |
|
#4 |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
Here it is:
Code:
DDtU = fvc::ddt(U) + fvc::div(phi, U) - fvc::div(phi)*U; Best,
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
|
June 4, 2011, 10:59 |
|
#5 |
Senior Member
|
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. |
|
June 4, 2011, 11:32 |
|
#6 | |
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36 |
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,
__________________
Alberto Passalacqua GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541) OpenQBMM - An open-source implementation of quadrature-based moment methods. To obtain more accurate answers, please specify the version of OpenFOAM you are using. |
||
June 6, 2011, 01:44 |
|
#7 | |
Senior Member
|
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 ( IOobject ( "DDtU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh ); Code:
DDtU = fvc::ddt(U) + fvc::div(phi, U) - fvc::div(phi)*U; Code:
EXE = $(FOAM_APPBIN)/pisoFoam2 After this steps and running a case with pisoFoam2 this error is displayed: HTML Code:
Reading field p
Reading field U
--> FOAM FATAL ERROR:
NO_READ specified for read-constructor of object DDtU of class IOobject
From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 46.
FOAM aborting
#0 Foam::error::printStack(Foam::Ostream&) in "/home/maysam/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/maysam/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 Foam::regIOobject::readStream() in "/home/maysam/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libOpenFOAM.so"
#3 Foam::regIOobject::readStream(Foam::word const&) in "/home/maysam/OpenFOAM/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libOpenFOAM.so"
#4 Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&) in "/home/maysam/OpenFOAM/OpenFOAM-1.7.0/applications/bin/linux64GccDPOpt/pisoFoam2"
#5
in "/home/maysam/OpenFOAM/OpenFOAM-1.7.0/applications/bin/linux64GccDPOpt/pisoFoam2"
#6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7
in "/home/maysam/OpenFOAM/OpenFOAM-1.7.0/applications/bin/linux64GccDPOpt/pisoFoam2"
Aborted
Regards. |
||
June 6, 2011, 04:05 |
|
#8 |
Member
Gregor Olenik
Join Date: Jun 2009
Location: http://greole.github.io/
Posts: 89
Rep Power: 16 |
sorry double post
Last edited by gregor; June 6, 2011 at 05:45. |
|
June 6, 2011, 04:06 |
|
#9 |
Member
Gregor Olenik
Join Date: Jun 2009
Location: http://greole.github.io/
Posts: 89
Rep Power: 16 |
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 ( IOobject ( "kappa", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedScalar("zero", dimless, 0.0) ); gregor |
|
June 6, 2011, 05:44 |
|
#10 | |
Senior Member
|
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:
|
||
June 6, 2011, 05:58 |
|
#11 |
Member
Gregor Olenik
Join Date: Jun 2009
Location: http://greole.github.io/
Posts: 89
Rep Power: 16 |
try dimensionedScalar("ddtU", dimVelocity/dimTime/dimTime, 0.0)
edit: well obviously it has to be vector::zero instead of 0.0 Last edited by gregor; June 7, 2011 at 03:52. |
|
June 6, 2011, 11:49 |
|
#12 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24 |
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) ); ) |
|
June 6, 2011, 15:58 |
|
#13 | ||
Senior Member
|
Quote:
The problem is solved by: Code:
volVectorField DDtU ( IOobject ( "DDtU", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedVector("DDtU",dimensionSet(0,1,-2,0,0,0,0),vector::zero) ); Quote:
|
|||
June 7, 2011, 03:17 |
|
#15 |
Senior Member
|
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) |
|
June 8, 2011, 14:45 |
|
#16 | |
Senior Member
|
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 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to solve in simpleFoam with a volumesourceterm implicity | booz | OpenFOAM Running, Solving & CFD | 3 | March 12, 2009 03:17 |
How to decide PDE type for 1st order scalar PDE's | shantanu | Main CFD Forum | 28 | June 23, 2008 12:48 |
Wave Amplitudes for Non-Reflective Boundaries | Richard Wagner | Main CFD Forum | 8 | April 20, 2006 15:35 |
how to get the particle relative acceleration? | winnie | FLUENT | 6 | June 2, 2003 22:08 |