|
[Sponsors] |
July 4, 2023, 04:03 |
Uds
|
#1 |
New Member
arshia amiri
Join Date: Jul 2023
Posts: 3
Rep Power: 3 |
hello everyone i want to write a UDS function for viscoelastic fluid and this is my code for source term of transport equations for this case :
DEFINE_SOURCE(my_UDS_source1,c,t,dS,eqn) { real rho; real lambda; real C11 , C22 , C33 , C12 , C13 , C23 ; real fr=1; real d_d[3][3]; lambda = 0.1; rho = C_R(c,t); C11 = C_UDSI(c,t,0); C12 = C_UDSI(c,t,1); C13 = C_UDSI(c,t,2); C22 = C_UDSI(c,t,3); C23 = C_UDSI(c,t,4); C33 = C_UDSI(c,t,5); d_d[0][0]=C_DUDX(c,t); d_d[0][1]=C_DUDY(c,t); d_d[0][2]=C_DUDZ(c,t); d_d[1][0]=C_DVDX(c,t); d_d[1][1]=C_DVDY(c,t); d_d[1][2]=C_DVDZ(c,t); d_d[2][0]=C_DWDX(c,t); d_d[2][1]=C_DWDY(c,t); d_d[2][2]=C_DWDZ(c,t); //i=1 , j=1 dS[eqn]=0; return C11*d_d[0][0]+2*C12*d_d[0][1]+2*C13*d_d[0][2]+C11*d_d[0][2]-(1/lambda)*(fr*(C11)-1); } DEFINE_SOURCE(my_UDS_source2,c,t,dS,eqn) { real rho; real lambda; real C11 , C22 , C33 , C12 , C13 , C23 ; real fr=1; real d_d[3][3]; lambda = 0.1; rho = C_R(c,t); C11 = C_UDSI(c,t,0); C12 = C_UDSI(c,t,1); C13 = C_UDSI(c,t,2); C22 = C_UDSI(c,t,3); C23 = C_UDSI(c,t,4); C33 = C_UDSI(c,t,5); d_d[0][0]=C_DUDX(c,t); d_d[0][1]=C_DUDY(c,t); d_d[0][2]=C_DUDZ(c,t); d_d[1][0]=C_DVDX(c,t); d_d[1][1]=C_DVDY(c,t); d_d[1][2]=C_DVDZ(c,t); d_d[2][0]=C_DWDX(c,t); d_d[2][1]=C_DWDY(c,t); d_d[2][2]=C_DWDZ(c,t); dS[eqn]=0; //i=1 , j=2 return C11*d_d[1][0]+C12*(d_d[1][1]+d_d[1][0])+C13*d_d[1][2]+C22*d_d[0][1]+C23*d_d[0][2]-(1/lambda)*(fr*C12); } |
|
July 4, 2023, 04:05 |
|
#2 |
New Member
arshia amiri
Join Date: Jul 2023
Posts: 3
Rep Power: 3 |
but i received below error :
the fl process could not be started |
|
July 4, 2023, 07:14 |
|
#3 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
did you defined all 6 scalars before pressing run button?
__________________
best regards ****************************** press LIKE if this message was helpful |
|
July 4, 2023, 07:16 |
|
#4 |
New Member
arshia amiri
Join Date: Jul 2023
Posts: 3
Rep Power: 3 |
how can i define 6 scalars?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Change UDS Inlet Typ with UDF possible? | schwaral | Fluent UDF and Scheme Programming | 8 | September 17, 2020 09:47 |
Can you explain me how to use UDS? | Tleja | Fluent UDF and Scheme Programming | 0 | July 14, 2015 02:52 |
Set UDS on wall... | fivos | Fluent UDF and Scheme Programming | 2 | July 25, 2014 06:57 |
Calculate UDS flux through the wall | ananth_01 | FLUENT | 0 | August 5, 2013 08:33 |
Doubts UDS Flux, UDS Unsteady for VOF model | kel85uk | FLUENT | 0 | March 17, 2010 09:53 |