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

mapping of pressure field (simplefoam to cavitatingFoam)

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 14, 2011, 10:58
Smile mapping of pressure field (simplefoam to cavitatingFoam)
  #1
Member
 
Join Date: Sep 2010
Posts: 36
Rep Power: 6
siddharameshwara is on a distinguished road
Hello to all,

I would like to map the pressure field of simpleFoam to cavitatingFoam. There is difference in pressue field of simpleFoam(it is in m2/s2 units) and cavitatingFoam( it is in kg/m/s2). There is difference between them by factor of density of fluid i am using. For that i have a file. I just found it in internet. Could any one tell me how to use it???


Thanks in advance.

Last edited by siddharameshwara; February 17, 2011 at 06:17.
siddharameshwara is offline   Reply With Quote

Old   February 15, 2011, 03:55
Default
  #2
Senior Member
 
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 414
Rep Power: 10
mvoss is on a distinguished road
how can anybody know what you found "in the internet".
What kind of packages/data do you get after unpacking the file?
mvoss is offline   Reply With Quote

Old   February 15, 2011, 04:05
Smile
  #3
Member
 
Join Date: Sep 2010
Posts: 36
Rep Power: 6
siddharameshwara is on a distinguished road
Hi,

I am new to this openFoam. So i didnt posted in a right way. It contains Make directory with 'files and options' files in it. and also convertPhi.C file. So i dont know how i can use it so that i can map(pressure field) from simpleFoam result to cavitatingFoam.

Or...is there any way to map the fields??

kindly suggest me.

Thanks
siddharameshwara is offline   Reply With Quote

Old   February 15, 2011, 04:14
Default
  #4
Senior Member
 
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 414
Rep Power: 10
mvoss is on a distinguished road
try to run wclean and a wmake in that directory. that will give you a library convertingPhi.lo which you can run from within your cavitatingFoam dir after maping your simpleFoam results.
Why don´t you just copy the 0/p-U-... files (convert them properly) from simpleFoam and run cavitatingFoam? But mapping is also fine....

neewbie
mvoss is offline   Reply With Quote

Old   February 15, 2011, 05:47
Smile
  #5
Member
 
Join Date: Sep 2010
Posts: 36
Rep Power: 6
siddharameshwara is on a distinguished road
Hello,

Thank you very much for the quick response. I tried the way you told me. I tried to make dynamic linking by typing the command wmake libso. It displayed the following message.

'libNULL.so' is up to date

So now if i want to use it how i can use???...how this could be used to map the results

i am sorry if this question is silly.

Thanks in advance..
siddharameshwara is offline   Reply With Quote

Old   February 15, 2011, 05:49
Default
  #6
Senior Member
 
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 414
Rep Power: 10
mvoss is on a distinguished road
why wmake libso?
Can you post a download?
mvoss is offline   Reply With Quote

Old   February 15, 2011, 06:07
Smile
  #7
Member
 
Join Date: Sep 2010
Posts: 36
Rep Power: 6
siddharameshwara is on a distinguished road
Hello,

When i looked in my documents i have found wmake libso would be best one. So, that it will have dynamic linking. I think it doesnt matter if it is static or dynamic link. Correct me if i am wrong!!

You can find in my attachments convertPhi.C file

I cant upload file and options. I have some problem.

In the Make--> file its written

convertPhi.C

EXE = $(FOAM_APPBIN)/convertPhi


and in make--> options its written

EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude

EXE_LIBS = \
-lfiniteVolume

Last edited by siddharameshwara; February 17, 2011 at 06:11.
siddharameshwara is offline   Reply With Quote

Old   February 15, 2011, 06:16
Default
  #8
Senior Member
 
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 414
Rep Power: 10
mvoss is on a distinguished road
change
convertPhi.C
EXE = $(FOAM_APPBIN)/convertPhi
to
myconvertPhi.C
EXE = $(FOAM_USER_RAPPBIN)/myconvertPhi

change the .C file to myconvertPhi.C
wclean
wmake (not wmake libso)

run the tool in the copied file-structure of the simpleFoam run by typing
myconvertPhi

Make sure $FOAM_USER_APPBIN is set properly, check with
echo $FOAM_USER_APPBIN.

neewbie
mvoss is offline   Reply With Quote

Old   February 15, 2011, 06:39
Smile
  #9
Member
 
Join Date: Sep 2010
Posts: 36
Rep Power: 6
siddharameshwara is on a distinguished road
run the tool in the copied file-structure of the simpleFoam run by typing
myconvertPhi

Hi,

I didnt understand the above statement.

Firstly, i will get the solution by typing the command simpleFoam in my directory where i am solving problem. So, when i have to type this command myconvertPhi after getting the solution of simpleFoam or what?? i cant type the command myconvertPhi and simpleFoam at a time.

Secondly should i copy the files that i have send you in the directory where i have ia m running simpleFoam

Thirdly, How after running the simulation i can map it.


Please clear this. i am sorry if i am roubling you.

Thnaks
siddharameshwara is offline   Reply With Quote

Old   February 15, 2011, 06:52
Default
  #10
Senior Member
 
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 414
Rep Power: 10
mvoss is on a distinguished road
Quote:
Originally Posted by siddharameshwara View Post
Firstly, i will get the solution by typing the command simpleFoam in my directory where i am solving problem. So, when i have to type this command myconvertPhi after getting the solution of simpleFoam or what?? i cant type the command myconvertPhi and simpleFoam at a time.
1. compile the myconverPhi.C somewhere in a single folder by doing as stated above
if you succeed then you should be able to type "myco+[TAB]" and your system will auto-complete the rest for you; as the autofilling is working your system knows where to search for "myconvertPhi"($FOAM_USER_APPBIN) and the tool can at least be executed
2.create a case and run simpleFOAM
3.run myconvertPhi there after the simpleFOAM finished
4. map to your cavitatingFOAM directory
Quote:
Secondly should i copy the files that i have send you in the directory where i have ia m running simpleFoam
NO... see above 1.
Quote:
Thirdly, How after running the simulation i can map it.
(check out http://openfoamwiki.net/index.php/MapFields)
mvoss is offline   Reply With Quote

Old   February 15, 2011, 07:03
Smile
  #11
Member
 
Join Date: Sep 2010
Posts: 36
Rep Power: 6
siddharameshwara is on a distinguished road
Hi,

Thank you so much for the detail description. I will try it out the steps said by you.
siddharameshwara is offline   Reply With Quote

Old   February 15, 2011, 09:21
Smile
  #12
Member
 
Join Date: Sep 2010
Posts: 36
Rep Power: 6
siddharameshwara is on a distinguished road
Hello,

I tried the steps said by you. But i am getting one error. I.e.

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 1.6.x
Exec : myconvertPhi
Date : Feb 15 2011
Time : 14:12:37
Host : rbgv119x
PID : 4674
Case : /appl/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/fields/fvPatchFields/derived/myconvertPhi
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


--> FOAM FATAL ERROR:
Missing reference density


From function myconvertPhi
in file myconvertPhi.C at line 43.

FOAM exiting



So where should i give this reference density??. in my case for simpleFoam solver no where i mentioned the density. I mentioned only kinematic viscocity in constant/transportProperties. So where can i give reference velocity or is there any other way???...Fluid is desel.

Thanks inadvance.
siddharameshwara is offline   Reply With Quote

Old   February 15, 2011, 09:46
Default
  #13
Senior Member
 
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 414
Rep Power: 10
mvoss is on a distinguished road
first of all: it´s not good idea to put stuff in /appl/OpenFOAM/OpenFOAM-1.6.x/src/~ ... put your personal stuff beside the OF installation but that´s also a matter of taste.

rhoRef is a parameter for myconvertPhi

Code:
if (!args.options().found("rhoRef"))
    {
        FatalErrorIn(args.executable())
            << "Missing reference density"
            << endl;

        FatalError.exit();
    }
in myconvertPhi.C

argc=Number of Arguments
agrv=Argument

so try smth. like myconvertPhi 1000
1000 being your rhoRef.

Last edited by mvoss; February 16, 2011 at 04:24.
mvoss is offline   Reply With Quote

Old   February 15, 2011, 09:56
Smile
  #14
Member
 
Join Date: Sep 2010
Posts: 36
Rep Power: 6
siddharameshwara is on a distinguished road
Hey,

Thank you so much. It worked out. I looked at my rhop new file everything is fine the values and all......wow...thanks a lot for all your messages. Have a g8 day!!!
siddharameshwara is offline   Reply With Quote

Old   February 15, 2011, 09:59
Default
  #15
Senior Member
 
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 414
Rep Power: 10
mvoss is on a distinguished road
u r welcome...
mvoss is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 07:27
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51
Import gmsh msh to Foam adorean Open Source Meshers: Gmsh, Netgen, CGNS, ... 24 April 27, 2005 09:19
About Pressure Field with Cyclic Boundary Conditio Jiaying Xu CD-adapco 2 October 4, 2001 10:11
Using SIMPLE david Main CFD Forum 5 July 21, 1999 03:38


All times are GMT -4. The time now is 16:55.