|
[Sponsors] |
April 23, 2015, 07:01 |
transient boundary condition for UDS
|
#1 |
Member
Dr. Moloy Kumar Banerjee
Join Date: Jun 2011
Posts: 71
Rep Power: 15 |
Dear all,
I am trying to give a voltage input as defined by the square pulse (attached figure), while doing some mhd calculation using electric potential method in Fluent. Could u suggest me how to implement this in the boundary condition panel for the potential value defined by the UDS. with regards, |
|
April 23, 2015, 07:34 |
|
#2 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
This topic has been covered a number of times, here's a recent thread (less than two weeks old!) which should help get you started: UDF for unsteady velocity inlet.
|
|
April 23, 2015, 07:45 |
|
#3 |
Member
Dr. Moloy Kumar Banerjee
Join Date: Jun 2011
Posts: 71
Rep Power: 15 |
Thanks for your quick response, but the same UDF I have already used for the definition of velocity but when it comes for the UDS boundary condition it gives the access violation error.
|
|
April 23, 2015, 07:53 |
|
#4 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Could you provide us further details including your UDF and the error? Have you enabled a sufficient number of User-Defined Scalars?
|
|
April 23, 2015, 08:10 |
|
#5 |
Member
Dr. Moloy Kumar Banerjee
Join Date: Jun 2011
Posts: 71
Rep Power: 15 |
In fluent when the mhd model is initiated then it automatically load 1 UDS and 42 UDM through predefined UDF, which is automatically hooked during the initialization of the model. The 1st UDS gives the value for electric potential (E) and the 13th UDM gives magnitude of electric field.
So, I just want to define the UDS as a function that I have mentioned before with the following udf, it compiled without any error but once i hook this in the boundary condition panel for the electrode surface, it gives the access violation error. #include "udf.h" DEFINE_PROFILE(voltage, t, i) { real voltage; real the_current_time; face_t f; cell_t c; the_current_time = CURRENT_TIME; if ((the_current_time>=0) && (the_current_time<=.1)) { C_UDSI(c,t,0)=10; } else { C_UDSI(c,t,0)=0; } if ((the_current_time>=1.) && (the_current_time<=1.1)) { C_UDSI(c,t,0)=10; } else { C_UDSI(c,t,0)=0; } if ((the_current_time>=2.) && (the_current_time<=2.1)) { C_UDSI(c,t,0)=10; } else { C_UDSI(c,t,0)=0; } begin_f_loop(f,t) { F_PROFILE(f,t,i) = C_UDSI(c,t,0); } end_f_loop(f,t) } Error: C:\PROGRA~1\ANSYSI~1\v145\fluent\fluent14.5.0 tx86\3d\fl1450s.exe received fatal signal (ACCESS_VIOLATION) 1. Note exact events leading to error. 2. Save case/data under new name. 3. Exit program and restart to continue. 4. Report error to your distributor. Error Object: #f |
|
April 23, 2015, 09:54 |
|
#6 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Your first two if statements are effectively doing nothing because the third if statement overwrites by setting your electric potential to 10 for time between 2 s and 2.1 s, and an electric potential of zero otherwise.
Why are you trying to set a value to C_UDSI(c,t,0) and then use this value for the F_PROFILE? Use if statements within the face loop and set a value directly, for example: Code:
if ((the_current_time>=2.) && (the_current_time<=2.1)) F_PROFILE(f,t,i) = 10.; else F_PROFILE(f,t,i) = 0.; |
|
April 24, 2015, 02:15 |
|
#7 |
Member
Dr. Moloy Kumar Banerjee
Join Date: Jun 2011
Posts: 71
Rep Power: 15 |
Thanks for pointing the error. I have made the follwing correction in the code as mentioned by you.
begin_f_loop(f,t) { if ((the_current_time>=0) && (the_current_time<=.1)) F_PROFILE(f,t,i)=10; else F_PROFILE(f,t,i)=0; } end_f_loop(f,t) } but still, the voltage is not becoming zero once the time is>0.1 |
|
April 24, 2015, 04:03 |
|
#8 |
Member
Dr. Moloy Kumar Banerjee
Join Date: Jun 2011
Posts: 71
Rep Power: 15 |
Please go through the attached figures, which says that the there is no option to enter the udf for the voltage value in the BC panel for the mhd model window (fig.1) and thus it remains unaltered throughout the simulation, irrespective of the UDF entered as in fig.2
|
|
April 25, 2015, 22:44 |
|
#9 |
Member
Dr. Moloy Kumar Banerjee
Join Date: Jun 2011
Posts: 71
Rep Power: 15 |
Any body working with the mhd module please help me. I desperately need the support from your end.
|
|
April 25, 2017, 17:53 |
|
#10 |
New Member
Yonatan Afework Tesfahunegn
Join Date: Mar 2013
Posts: 15
Rep Power: 13 |
I have the same issue, anyone who has resolved this problem?
|
|
August 1, 2022, 09:11 |
|
#11 | |
Member
sina
Join Date: Nov 2021
Posts: 41
Rep Power: 5 |
Quote:
I want to set sinusoidal value of electric potential (MHD module) for a wall, first i try expression but i faced to error : Error: wta(2nd) to string_eq Error Object: __expr__ then i try Profile and UDF profile , but agian i faced to problem , when i use them it consider the wall to insulated. Could you help me how can i set sinusoidal value for current density ( Electric Potential MHD) ? Best Regards, |
||
August 3, 2022, 07:51 |
|
#12 | |
Member
sina
Join Date: Nov 2021
Posts: 41
Rep Power: 5 |
Quote:
How can i change UDS boundary value in a Define Adjust UDF? i mean how can i call UDS boundary value to changing in a UDF of Define Adjust? Regards, |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
Low Mixing time Problem | Mavier | CFX | 5 | April 29, 2013 01:00 |
External Radiation Boundary Condition for Grid Interface | CFD XUE | FLUENT | 0 | July 9, 2010 03:53 |
External Radiation Boundary Condition (Two sided wall), Grid Interface | CFD XUE | FLUENT | 0 | July 8, 2010 07:49 |
vorticity boundary condition | bearcharge | Main CFD Forum | 0 | May 14, 2010 12:32 |