Questions and remarks about code_saturne usage
DH07120S
Post
by DH07120S » Wed Oct 10, 2012 8:46 am
Hello,
I'm trying use the subroutine ustssc to impose a volumic source condition.
I want to impose a a volumic power but I don't succed.
My version of CS is 2.2.2.
My code is :
Code: Select all
pwatt = 100000.d0/4185.d0
CALL GETCEL('GrMaillage_rouge_2_3_Volumes',NLELT,LSTELT)
do ilelt = 1, nlelt
iel = lstelt(ilelt)
volf = volf + volume(iel)
enddo
do ilelt = 1, nlelt
iel = lstelt(ilelt)
! No implicit source term
crvimp(iel) = 0.d0
! Explicit source term
crvexp(iel) = volume(iel)*pwatt/volf
enddo
I put the Temperature(Celsius) as a scalar.
Thank you,
Damien H
DH07120S
Post
by DH07120S » Wed Oct 10, 2012 8:53 am
My error is :
Code: Select all
Signal SIGSEGV (accès à une zone mémoire interdite) intercepté !
Pile d'appels :
1: 0x7fe9b3b4cd32 <fvm_selector_get_list+0x272> (libsaturne.so.0)
2: 0x7fe9b3a17deb <cs_selector_get_cell_list+0x3b> (libsaturne.so.0)
3: 0x7fe9b3a186b7 <csgcel_+0x287> (libsaturne.so.0)
4: 0x7fe9b3a192a3 <getcel_+0x23> (libsaturne.so.0)
5: 0x400948 <ustssc_+0x34> (cs_solver)
6: 0x7fe9b39cd908 <covofi_+0x498> (libsaturne.so.0)
7: 0x7fe9b3aa2f81 <scalai_+0xda1> (libsaturne.so.0)
8: 0x7fe9b3aae969 <tridim_+0x4e69> (libsaturne.so.0)
9: 0x7fe9b39b5880 <caltri_+0x26e0> (libsaturne.so.0)
10: 0x7fe9b398ddab <cs_run+0x78b> (libsaturne.so.0)
11: 0x7fe9b398df85 <main+0x195> (libsaturne.so.0)
12: 0x7fe9b0caac8d <__libc_start_main+0xfd> (libc.so.6)
13: 0x400859 <> (cs_solver)
Fin de la pile
Jacques Fontaine
Posts: 118 Joined: Mon Feb 20, 2012 2:07 pm
Post
by Jacques Fontaine » Wed Oct 10, 2012 9:10 am
Hello,
Did you allocate lstelt (on ncelet)?
By the way, about volf : is it initialized to 0.d0?
Regards,
DH07120S
Post
by DH07120S » Wed Oct 10, 2012 9:17 am
Thank you,
That was my two errors.
Now it works.