Page 2 of 2

Re: Fan definition with cs_ventil

Posted: Mon Jul 02, 2012 2:50 pm
by Martin Isack
Hello,

I added d0 to all numbers like this:

Code: Select all

double precision cu(3), cd(3), fcar(3)

cu(1) = 1.d0
cu(2) = 0.d0
cu(3) = 1.d0
cd(1) = 1.d0
cd(2) = 2.d0
cd(3) = 1.d0
fcar(1) = 1.d0
fcar(2) = 1.d0
fcar(3) = 1.d0

call defvtl(1, 3, cu, cd, 1.d0, .9d0, .1d0, fcar, 1.d0)
call inivtl()
Now the initialization seems to work. numvtl prints 1 for some cells.

My next problem is the subroutine debvtl. I called it the following way:

Code: Select all

double precision flumas(1), flumab(1), rhofac(1), rhofab(1), debent(1), debsor(1)

flumas(1) = 1.d0
flumab(1) = 1.d0
rhofac(1) = 1.d0
rhofab(1) = 1.d0

call debvtl(flumas, flumab, rhofac, rhofab, debent, debsor)
code_saturne compile runs without errors, but the simulation stops with this error:

Code: Select all

SIGSEGV signal (forbidden memory area access) intercepted!

Call stack:
   1: 0x7f5e73695c3d <cs_ventil_calcul_debits+0x72d>  (libsaturne.so.0)
   2: 0x7f5e736962c1 <debvtl_+0x31>                   (libsaturne.so.0)
   3: 0x400d43     <cs_user_initialization_+0x19f>  (cs_solver)
   4: 0x7f5e736c3773 <inivar_+0xef>                   (libsaturne.so.0)
   5: 0x7f5e7361c73d <caltri_+0x2195>                 (libsaturne.so.0)
   6: 0x7f5e735fb6d0 <cs_run+0x7a0>                   (libsaturne.so.0)
   7: 0x7f5e735fae4c <main+0x18c>                     (libsaturne.so.0)
   8: 0x7f5e7225b76d <__libc_start_main+0xed>         (libc.so.6)
   9: 0x400ae9     <>                               (cs_solver)
End of stack
I also don't know what the different mass fluxes are for:

Code: Select all

 * DOUBLE PRECISION FLUMAS(*)      : <-- : Interior faces mass flux
 * DOUBLE PRECISION FLUMAB(*)      : <-- : Boundary faces mass flux
Regards

Martin

Re: Fan definition with cs_ventil

Posted: Mon Jul 02, 2012 3:56 pm
by Jacques Fontaine
Hello,
You can look in src/base/cs_ventil.c: flumas, flumab, etc. are arrays of dim ncel, nfabor, etc..

Best regards,
JF

Re: Fan definition with cs_ventil

Posted: Mon Jul 02, 2012 4:39 pm
by Martin Isack
Hello,

if I don't use debvtl I am able to run a successfull simulation. I called defvtl as written above. In ustsns I then inserted

Code: Select all

if (ivar.eq.iu) then
     call tsvvtl(1, crvexp)
endif

if (ivar.eq.iv) then
     call tsvvtl(2, crvexp)
endif

if (ivar.eq.iw) then
     call tsvvtl(3, crvexp)
endif
I have learned, that CCARAC and TAUVT affect the mass flow through the fan. Higher values equal higher mass flow. But what exactly these values stand for?

Regards

Martin

Re: Fan definition with cs_ventil

Posted: Mon Jul 02, 2012 5:47 pm
by Martin Isack
Hello,

I have found one answer myself. The characteristic curve is described as a polynomial of degree 2 and the values in CCARAC are the coefficients of this function.

Regards

Martin