|
[Sponsors] |
Modifying rhoSimpleFoam to calculate ptot every iteration |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 13, 2010, 03:59 |
Modifying rhoSimpleFoam to calculate ptot every iteration
|
#1 |
Member
Join Date: Jun 2010
Posts: 33
Rep Power: 16 |
I want to modify rhoSimpleFoam so that it calculate ptot every time. I need ptot to calculate measuring total pressure with simpleFunctionObjects.
So, I have to change createFields.H and my_rhoSimpleFoam.C. I have tried it, but it didn't worked. In createFields.H, i have add this: Code:
Info<< "Reading field ptot\n" << endl; volVectorField ptot ( IOobject ( "ptot", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ) p + 0.5*rho*magSqr(U) ); Code:
ptot = p + 0.5*rho*magSqr(U) |
|
October 13, 2010, 04:09 |
|
#2 |
Member
Sabin Ceuca
Join Date: Mar 2010
Location: Munich
Posts: 42
Rep Power: 16 |
Code:
Info<< "Reading field ptot\n" << endl; volScalarField ptot ( IOobject ( "ptot", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ) p + 0.5*rho*magSqr(U) ); try it like this. The problem seemed be the declaration of ptot as volVectorField instead of volScalarField. Ciao, Sabin |
|
October 13, 2010, 04:25 |
|
#3 |
Member
Join Date: Jun 2010
Posts: 33
Rep Power: 16 |
thanks for the fast reply.
I have tried volSalarField, but it doesn't solve the problem. cpp: Internal error: Floating point exception (program cc1) Please submit a full bug report. See <http://gcc.gnu.org/bugs.html> for instructions. make: *** [linux64GccDPOpt/options] Error 1 cpp: Internal error: Floating point exception (program cc1) Please submit a full bug report. See <http://gcc.gnu.org/bugs.html> for instructions. make: *** [linux64GccDPOpt/files] Error 1 wmake error: file 'Make/linux64GccDPOpt/objectFiles' could not be created |
|
October 13, 2010, 05:20 |
|
#4 |
Senior Member
Stefan Herbert
Join Date: Dec 2009
Location: Darmstadt, Germany
Posts: 129
Rep Power: 18 |
This doesn't look like a standard compilation error. I think there is something wrong with you compiler itself or with you Make/options (if you changed anything there). Can you try compiling on another maschine?
Regards, Stefan |
|
October 13, 2010, 06:00 |
|
#5 |
Member
Join Date: Jun 2010
Posts: 33
Rep Power: 16 |
You're right, thanks. I have to use another machine.
Now I can use my_rhoSimpleFoam to calculate ptot. Here is my code (I have found two faults in it): my_rhoSimpleFoam.C: Code:
turbulence->correct(); //BEGIN NEW ptot = p + 0.5*rho*magSqr(U); //END NEW runTime.write(); Code:
mesh ); //BEGIN NEW Info<< " Reading field ptot\n" << endl; volScalarField ptot ( IOobject ( "ptot", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), p + 0.5*rho*magSqr(U) ); //END NEW #include "compressibleCreatePhi.H" |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regarding Coefficient-of-Discharge of intake port | LeelaPrasad | Siemens | 2 | March 9, 2017 06:48 |
How to calculate the convergence rate of Gauss-Seidel line iteration? | hadesmajesty | Main CFD Forum | 0 | November 2, 2009 23:08 |
RhoSimpleFoam FoamX | spv24 | OpenFOAM Running, Solving & CFD | 1 | July 21, 2008 11:29 |
Parallel runs slower with MTU=9000 than MTU=1500 | Javier Larrondo | FLUENT | 0 | October 28, 2007 23:30 |
Heat exchanger problem | chiseung | FLUENT | 16 | October 20, 2001 05:36 |