Page 1 of 1
How to create a pressure differential in a tube ?
Posted: Mon Apr 02, 2012 11:34 am
by Fabien852
Hello,
My problematic is as follows:
Take for example a tube,
I wish to apply a vacuum at the output, we will have so a pressure differential between the inlet and the outlet producing thus a flow.
With what I found on the internet, I could apply a flow in entry and one exit pressure but this is not what I search to do.
Do you know how to do that?
Best regards,
Fabien
Re: How to create a pressure differential in a tube ?
Posted: Mon Apr 02, 2012 4:25 pm
by Jacques Fontaine
Hello,
You can specify custom boundary conditions in usclim.f90 or cs_user_boundary_conditions.f90 (depending on version).
You can also add (in momentum eq.) a source term which can be added in ustsns.f90 or cs_user_source_terms.f90 and add periodicity in order to simulate infinite channel.
JF
Re: How to create a pressure differential in a tube ?
Posted: Wed Apr 04, 2012 11:13 am
by Fabien852
Hello,
thank you for the answer.
I made what I read here :
https://code-saturne.info/products/code ... /754965936
but it doesn't work.
To summarise, I want for each boundary :
Inlet : 101325 Pa
Outlet : 90000 Pa
So, I put in usclim file, this code :
Code: Select all
ITYPFB(IFAC,IPHAS)=IENTRE
ICODCL(IFAC,IPR(IPHAS))=1
RCDOCL(IFAC,IPR(IPHAS),1)=101325
ICODCL(IFAC,IU(IPHAS))=0
ICODCL(IFAC,IV(IPHAS))=0
ICODCL(IFAC,IW(IPHAS))=0
Code: Select all
ITYPFB(IFAC,IPHAS)=ISOLIB
ICODCL(IFAC,IPR(IPHAS))=1
RCODCL(IFAC,IPR(IPHAS),1)=90000
And when i start the runcase, i have this error :
The error file say that come from to this code :
I don't know why !
Could you help me ?
I attached the usclim.f90
My code saturne version is 2.0.2
Best regards,
Fabien
Re: How to create a pressure differential in a tube ?
Posted: Thu Apr 12, 2012 11:29 am
by Fabien852
Anyone ?
Re: How to create a pressure differential in a tube ?
Posted: Thu Apr 12, 2012 4:05 pm
by Jacques Fontaine
Hello,
RCDOCL(IFAC,IPR(IPHAS),1)=101325
rcodcl(...... ) = ...
Best regards,
JF
Re: How to create a pressure differential in a tube ?
Posted: Thu Apr 12, 2012 4:46 pm
by Fabien852
Hello,
Thank you very much, it works really well !!!
Fabien
Re: How to create a pressure differential in a tube ?
Posted: Mon Jul 09, 2012 7:10 am
by fif
Hi,
I'm trying for 2 days to create a pressure differential setting the inlet and outlet pressure in the usclim script without a success (I wrote the same script for inlet and outlet than above). In facts, I set a velocity equal to 0. But a differential pressure should impose the velocity...
So I think my script is not good :
error file : SIGSEGV signal (forbidden memory area access) intercepted !
listing : All variables(mass flow, pressure, velocity) are equal to zero at every step...
Tank you a lot if anyone can help me to solve this problem
Regards
fif
Re: How to create a pressure differential in a tube ?
Posted: Tue Jul 10, 2012 10:34 pm
by Jacques Fontaine
Hello,
Which version of Code_Saturne are you using?
It will be very difficult to help you without any listing/user sources/xml !
By the way, as I said previously, the easiest way to create a pressure differential is to impose a source term in the momentum equation (see the subroutine ustsns).
Regards,
JF
Re: How to create a pressure differential in a tube ?
Posted: Wed Jul 11, 2012 10:37 am
by fif
Hello,
Thank you JF for you answer !
My code saturne version is 2.0.2 too.
The simulation is running actually only if I set a velocity which is not equal to zero for the inlet condition (in the "step by step" preprocessing of saturne).
The problem is that it seems that's the velocity which impose the pressure and I would like to do the contrary (indeed, the velocity stays the same during all the differents iterations whereas I don't manage to do the correlation between the pressure I set and the pressure visualized with postpro).
Here is attached my script :
and for the listing I have to search because it says to me : L’extension 07111211 n’est pas autorisée.
Otherwise, is it possible that you send me how impose this source term in ustsns? I confess being really bad with scripts...
Best Regards,
fif
Re: How to create a pressure differential in a tube ?
Posted: Wed Jul 11, 2012 11:21 am
by fif
et voici le listing :
et le .xml :
cordialement
