|
[Sponsors] |
Problems with finding normalized mean wind speed |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 26, 2009, 13:22 |
Problems with finding normalized mean wind speed
|
#1 |
New Member
Alice
Join Date: Nov 2009
Posts: 16
Rep Power: 17 |
Dear all,
I just got some problems when writing codes for an application to generate the normalized mean wind speed...the following are the codes: #include "fvCFD.H" #include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H" #include "incompressible/RASModel/RASModel.H" int main(int argc, char *argv[]) { # include "setRootCase.H" # include "createTime.H" # include "createMesh.H" # include "createFields.H" for (runTime++; !runTime.end(); runTime++) { volScalarField Unorm=(1/9.9)*mag(U); Unorm.write(); runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; Info<< "End\n" << endl; } return(0); } .................................................. .................................................. ........................ The above are the codes.....when I tried to execute this application, I got the following error: "Reading field U Cannot open file" I wonder if there's anything wrong with my codes?? Thanks!! Alice |
|
December 28, 2009, 04:14 |
|
#2 |
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18 |
Hi Alice,
The error message says the solver cannot open file U. Do you have a case set up with a file 0/U?
__________________
Regards, Gijs |
|
December 28, 2009, 22:20 |
|
#3 |
New Member
Alice
Join Date: Nov 2009
Posts: 16
Rep Power: 17 |
Dear gwierink,
Yes I do have the file 0/U, but I don't know why I still can't run the application... Regards, Alice |
|
December 29, 2009, 04:47 |
|
#4 |
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18 |
Dear Alice,
Are you modifying a solver? Is the code you posted above all code you're compiling and running? Because if it is all code, you're seemingly not solving any equations for U (or p), just calculating Unorm for one time step ... Can you insert your part of the code (the part about Unorm) into an existing solver, save it under a different name, compile it, and see if it runs?
__________________
Regards, Gijs |
|
December 29, 2009, 08:09 |
funkySetFields
|
#5 |
Member
Michael Roth
Join Date: Mar 2009
Location: Guelph, Ontario, Canada
Posts: 50
Rep Power: 17 |
How about funkySetFields? i.e. something like (untested):
Code:
funkySetFields -create -field Unorm -time 0 -expression 'mag(U)/9.9' Code:
OpenFOAM\OpenFOAM-1.6.x\applications\utilities\postProcessing\velocityField\vorticity\vorticity.C |
|
January 8, 2010, 03:09 |
|
#6 |
New Member
Alice
Join Date: Nov 2009
Posts: 16
Rep Power: 17 |
Dear gwierink and Mike,
Thanks for your help! I want to ask one more question: is there a utility called "magU" in OpenFOAM-1.5 ? Regards, Alice |
|
January 8, 2010, 04:07 |
|
#7 |
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18 |
Hi Alice,
I would use mag(U) to get the magnitude of U. But of course you could write something like volScalarField magU = mag(U), to use magU in an equation for better readability.
__________________
Regards, Gijs |
|
January 18, 2010, 04:51 |
|
#8 |
New Member
Alice
Join Date: Nov 2009
Posts: 16
Rep Power: 17 |
Dear gwierink,
Thanks for your advice Alice |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to find RPM from wind speed in Floworks? | Matco | FloEFD, FloWorks & FloTHERM | 21 | March 22, 2010 16:18 |
Wind Tunnel Testing | Francesco Nicolosi | Main CFD Forum | 0 | November 25, 2008 13:55 |
problems in high speed external flow | jon william | FLUENT | 2 | January 14, 2007 07:37 |
High speed flow problems | Sawa | FLUENT | 3 | January 14, 2003 02:10 |
Atmospheric Wind Profile - Inlet Subroutine | Roger | Siemens | 3 | December 12, 2002 11:00 |