mapping of pressure field (simplefoam to cavitatingFoam)
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. |
how can anybody know what you found "in the internet".
What kind of packages/data do you get after unpacking the file? |
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 |
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 |
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.. |
why wmake libso?
Can you post a download? |
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 |
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 |
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 |
Quote:
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:
Quote:
|
Hi,
Thank you so much for the detail description. I will try it out the steps said by you. |
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: :mad:Missing reference density:mad: 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. |
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")) argc=Number of Arguments agrv=Argument so try smth. like myconvertPhi 1000 1000 being your rhoRef. |
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!!! |
u r welcome...
|
All times are GMT -4. The time now is 01:36. |