|
[Sponsors] |
January 21, 2020, 02:57 |
Modifying volumetric flux to mass flux
|
#1 |
Member
Join Date: Dec 2018
Posts: 75
Rep Power: 7 |
Hello everyone,
I want to initialize my solution with potentialFoam for the sonicFoam. However, since potentialFoam solves for incompressible flow, there will be dimension incompability in fluxes. Therefore, i need to convert volumetric flux (phi from potentialFoam) to mass flux(phi for compressible flow). I found a 'convertPhi.C' code(which is attached) which basically modify Phi by multipliying rho, also for other variables you can modify it later. However, when i try to run it , it asks for rhoRef value. I tried everything but it still asks. I tried to add rhoRef in constant/thermophysicalProperties, system/fvOptions, even in the code by basically adding 'scalar rhoRef(1.0)'. Is there anyone who sees what the problem is in here? Thanks for any suggestions! |
|
January 21, 2020, 03:33 |
|
#2 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Hi!
Just remove it. Then the solver will create the flux field for you from the velocity field. |
|
January 21, 2020, 03:43 |
|
#3 |
Member
Join Date: Dec 2018
Posts: 75
Rep Power: 7 |
||
January 21, 2020, 04:11 |
|
#4 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Sorry. Remove the phi file from the 0 folder. (if you have a parallel case, from every processor*/0 folder.) At least I think you have it in your 0 folder. Of course if for some reason your start time is not zero, then delete it from the proper time folder.
The solver will reconstruct your flux field from the velocity field (which is written by potentialFoam) correctly and you don't have to do any black magic trick. |
|
January 21, 2020, 05:28 |
|
#5 | |
Member
Join Date: Dec 2018
Posts: 75
Rep Power: 7 |
Quote:
I tried as you said but the main solver didn't reconstruct phi, again. In this way, there is no meaning of initialization.I think, i have to find a way to convert volumetric flow to mass flow .. |
||
January 21, 2020, 05:31 |
|
#6 |
Member
Join Date: Dec 2018
Posts: 75
Rep Power: 7 |
How do you make initialization for compressible flows, mr simfego?
|
|
January 21, 2020, 05:56 |
|
#7 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
There is a meaning since potentialFoam write the velocty field, and an approximated pressure field if needed near the flux field.
The velocity field is always written, which is reconstructed from the flux field. In the sonicFoam solver you include the compressibleCreatePhi.H file which will read the flux field if present, or create it if not (from the velocity field, as: "linearInterpolate(rho*U) & mesh.Sf()". Thus you have your flux field from the velocity field which is initialized by the potentialFoam solver mr hbulus! |
|
January 21, 2020, 06:01 |
|
#8 |
Member
Join Date: Dec 2018
Posts: 75
Rep Power: 7 |
Oh, finally it makes sense to use in that way, thanks a lot. I dont solve my problem about convertPhi yet, but i am working on it. If i would solve, i am gonna share with you. Thanks for the all information you gave me.
Have a good day |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
My radial inflow turbine | Abo Anas | CFX | 27 | May 11, 2018 01:44 |
Radiation interface | hinca | CFX | 15 | January 26, 2014 17:11 |
RPM in Wind Turbine | Pankaj | CFX | 9 | November 23, 2009 04:05 |
mass flux correction at outflow boundaries | Subhra Datta | Main CFD Forum | 2 | November 24, 2003 13:11 |
total mass flux correction for compressible fluid? | Francesco Di Maio | Main CFD Forum | 0 | August 21, 2000 04:23 |