Hi, I have a few questions.
I would like to know if it would be possible with code_saturne to specify separately the mass flow and the momentum flow at a supply opening?
For example by setting a mass flow rate in usclim.f90 and imposing a momentum source in the first grid adjacent to the inlet in ustsns.f90 . Would this be feasible? Or is there another way to do it?
Also I would like my flow to be oriented 40° upward, where could I specify the flow direction?
Thanks in advance,
Axel
Mass flow and momentum flow boundary conditions
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
Re: Mass flow and momentum flow boundary conditions
Hi Axel,
I'm going to answer to your second question first... sorry ;) So, you can specify the flow direction at the inlet directly from the graphical interface either by giving a vector coordinates or a vector formula for the direction. Likewise, you can code *whatever you want* in the usclim.f90 subroutine.
Concerning your first question, I'm not sure to clearly understand it. The velocity boundary condition at the inlet can be a mass flow rate, a volumic flow rate or a velocity (through the graphical interface). If you wish to add a momentum source term at the first cells next to the inlet, you can of course do that, but I'm not sure of how the code will react *numerically speaking*. Perhaps that what you should do is only to set a momentum source term (with ustsns.f90) at the first cells of your inlet, and define the inlet as an outlet... This may sound weird but it lets the code deal with what could happen at the inlet ;)
If I haven't answered your questions, let us know.
David
I'm going to answer to your second question first... sorry ;) So, you can specify the flow direction at the inlet directly from the graphical interface either by giving a vector coordinates or a vector formula for the direction. Likewise, you can code *whatever you want* in the usclim.f90 subroutine.
Concerning your first question, I'm not sure to clearly understand it. The velocity boundary condition at the inlet can be a mass flow rate, a volumic flow rate or a velocity (through the graphical interface). If you wish to add a momentum source term at the first cells next to the inlet, you can of course do that, but I'm not sure of how the code will react *numerically speaking*. Perhaps that what you should do is only to set a momentum source term (with ustsns.f90) at the first cells of your inlet, and define the inlet as an outlet... This may sound weird but it lets the code deal with what could happen at the inlet ;)
If I haven't answered your questions, let us know.
David
Re: Mass flow and momentum flow boundary conditions
Hi David, thanks for the answer.
So I'm trying to use ustsns to set the momentum source term in the cells directly adjacent to the inlet, using:
CALL GETCEL('(X.LE.0.55).AND.(X.GE.0.45) .AND.(Y.LE.0.02).AND.(Y.GE.0.).AND.(Z.LE.0.53) .AND.(Z.GE.0.47)',NLELT,LSTELT)
V0 = 3.11.D0 DO ILELT = 1, NLELT CRVIMP(ILELT) = 0 ENDDO
DO ILELT = 1, NLELT CRVEXP(ILELT) = VOLUME(ILELT)*PROPCE(ILELT,IPCROM)*V0 ENDDO
The calculation starts, but then I get the following error:
/sw/saturne4.2.4/src/fvm-0.12.0/src/fvm_selector_postfix.c:1284: Fatal error. Error parsing expression: (X.LE.0.55).AND.(X.GE.0.45)AND.(Y.LE.0.02).AND.(Y.GE.0.).AND.(Z.LE.0.53)AND.(Z.GE.0.47) ^ Expected operator instead of operand.
Would you have an idea of what I could do to fix that?
Thanks
So I'm trying to use ustsns to set the momentum source term in the cells directly adjacent to the inlet, using:
CALL GETCEL('(X.LE.0.55).AND.(X.GE.0.45) .AND.(Y.LE.0.02).AND.(Y.GE.0.).AND.(Z.LE.0.53) .AND.(Z.GE.0.47)',NLELT,LSTELT)
V0 = 3.11.D0 DO ILELT = 1, NLELT CRVIMP(ILELT) = 0 ENDDO
DO ILELT = 1, NLELT CRVEXP(ILELT) = VOLUME(ILELT)*PROPCE(ILELT,IPCROM)*V0 ENDDO
The calculation starts, but then I get the following error:
/sw/saturne4.2.4/src/fvm-0.12.0/src/fvm_selector_postfix.c:1284: Fatal error. Error parsing expression: (X.LE.0.55).AND.(X.GE.0.45)AND.(Y.LE.0.02).AND.(Y.GE.0.).AND.(Z.LE.0.53)AND.(Z.GE.0.47) ^ Expected operator instead of operand.
Would you have an idea of what I could do to fix that?
Thanks
Re: Mass flow and momentum flow boundary conditions
Hello,
The GETCEL syntax is not Fortran. The allowed syntax is described in the user documentation, but in your case, replacing .GE. and .LE. with >= and <= should do. Be careful, this is not a full function interpreter, so for example 'x + y < 4' is not allowed, though box[], plane[], ... constructs are allowed (see documentation).
Regards,
The GETCEL syntax is not Fortran. The allowed syntax is described in the user documentation, but in your case, replacing .GE. and .LE. with >= and <= should do. Be careful, this is not a full function interpreter, so for example 'x + y < 4' is not allowed, though box[], plane[], ... constructs are allowed (see documentation).
Regards,