How to create a pressure differential in a tube ?
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
How to create a pressure differential in a tube ?
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
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
-
- Posts: 118
- Joined: Mon Feb 20, 2012 2:07 pm
Re: How to create a pressure differential in a tube ?
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
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 ?
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 :
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
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 :
- For the inlet:
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
- For the outlet:
Code: Select all
ITYPFB(IFAC,IPHAS)=ISOLIB
ICODCL(IFAC,IPR(IPHAS))=1
RCODCL(IFAC,IPR(IPHAS),1)=90000
Code: Select all
COMPILE OR LINK ERROR
Code: Select all
RCDOCL(IFAC,IPR(IPHAS),1)=101325
Could you help me ?
I attached the usclim.f90
My code saturne version is 2.0.2
Best regards,
Fabien
- Attachments
-
- usclim.txt
- (30 KiB) Downloaded 402 times
-
- Posts: 118
- Joined: Mon Feb 20, 2012 2:07 pm
Re: How to create a pressure differential in a tube ?
Hello,
RCDOCL(IFAC,IPR(IPHAS),1)=101325
rcodcl(...... ) = ...
Best regards,
JF
RCDOCL(IFAC,IPR(IPHAS),1)=101325
rcodcl(...... ) = ...
Best regards,
JF
Re: How to create a pressure differential in a tube ?
Hello,
Thank you very much, it works really well !!!
Fabien
Thank you very much, it works really well !!!
Fabien
Re: How to create a pressure differential in a tube ?
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
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
-
- Posts: 118
- Joined: Mon Feb 20, 2012 2:07 pm
Re: How to create a pressure differential in a tube ?
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
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 ?
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
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 ?
et voici le listing : 
et le .xml :
cordialement 