CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Problems with finding normalized mean wind speed

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 26, 2009, 12:22
Default Problems with finding normalized mean wind speed
  #1
New Member
 
Alice
Join Date: Nov 2009
Posts: 16
Rep Power: 16
Alicelin is on a distinguished road
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
Alicelin is offline   Reply With Quote

Old   December 28, 2009, 03:14
Default
  #2
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
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
gwierink is offline   Reply With Quote

Old   December 28, 2009, 21:20
Default
  #3
New Member
 
Alice
Join Date: Nov 2009
Posts: 16
Rep Power: 16
Alicelin is on a distinguished road
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
Alicelin is offline   Reply With Quote

Old   December 29, 2009, 03:47
Default
  #4
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
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
gwierink is offline   Reply With Quote

Old   December 29, 2009, 07:09
Default funkySetFields
  #5
Member
 
Michael Roth
Join Date: Mar 2009
Location: Guelph, Ontario, Canada
Posts: 50
Rep Power: 17
roth is on a distinguished road
How about funkySetFields? i.e. something like (untested):
Code:
funkySetFields -create -field Unorm -time 0 -expression 'mag(U)/9.9'
Otherwise, if you want to go the roll-your-own route, try modifying a working utility that operates on U e.g. "vorticity", code found in
Code:
OpenFOAM\OpenFOAM-1.6.x\applications\utilities\postProcessing\velocityField\vorticity\vorticity.C
Mike
roth is offline   Reply With Quote

Old   January 8, 2010, 02:09
Default
  #6
New Member
 
Alice
Join Date: Nov 2009
Posts: 16
Rep Power: 16
Alicelin is on a distinguished road
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
Alicelin is offline   Reply With Quote

Old   January 8, 2010, 03:07
Default
  #7
Senior Member
 
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18
gwierink is on a distinguished road
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
gwierink is offline   Reply With Quote

Old   January 18, 2010, 03:51
Default
  #8
New Member
 
Alice
Join Date: Nov 2009
Posts: 16
Rep Power: 16
Alicelin is on a distinguished road
Dear gwierink,

Thanks for your advice

Alice
Alicelin is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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 15:18
Wind Tunnel Testing Francesco Nicolosi Main CFD Forum 0 November 25, 2008 12:55
problems in high speed external flow jon william FLUENT 2 January 14, 2007 06:37
High speed flow problems Sawa FLUENT 3 January 14, 2003 01:10
Atmospheric Wind Profile - Inlet Subroutine Roger Siemens 3 December 12, 2002 10:00


All times are GMT -4. The time now is 05:31.