|
[Sponsors] | |||||
|
|
|
#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. |
|
|
|
|
|
|
|
|
#4 |
|
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,877
Rep Power: 23 ![]() |
Here it is:
Code:
DDtU =
fvc::ddt(U)
+ fvc::div(phi, U)
- fvc::div(phi)*U;
Best,
__________________
Alberto GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image. GeekoCFD 32bit - The 32bit edition of GeekoCFD. GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats. |
|
|
|
|
|
|
|
|
#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. |
|
|
|
|
|
|
|
|
#6 | |
|
Senior Member
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,877
Rep Power: 23 ![]() |
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 GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image. GeekoCFD 32bit - The 32bit edition of GeekoCFD. GeekoCFD text mode - A smaller version of GeekoCFD, text-mode only, with only OpenFOAM. Available in a variety of virtual formats. |
||
|
|
|
||
|
|
|
#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. |
||
|
|
|
||
|
|
|
#8 |
|
Member
Gregor Olenik
Join Date: Jun 2009
Posts: 66
Rep Power: 5 ![]() |
sorry double post
Last edited by gregor; June 6, 2011 at 05:45. |
|
|
|
|
|
|
|
|
#9 |
|
Member
Gregor Olenik
Join Date: Jun 2009
Posts: 66
Rep Power: 5 ![]() |
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 |
|
|
|
|
|
|
|
|
#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:
|
||
|
|
|
||
|
|
|
#11 |
|
Member
Gregor Olenik
Join Date: Jun 2009
Posts: 66
Rep Power: 5 ![]() |
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. |
|
|
|
|
|
|
|
|
#12 |
|
Senior Member
|
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) ); ) |
|
|
|
|
|
|
|
|
#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:
|
|||
|
|
|
|||
|
|
|
#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) |
|
|
|
|
|
|
|
|
#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
|
||
|
|
|
||
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 04: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 |