|
[Sponsors] |
March 12, 2008, 14:02 |
Unsteady function for UDF
|
#1 |
Guest
Posts: n/a
|
Hello All I am trying to solve for time varying electric potential for the potential equation ?(i.e) poisson's equation the unsteady from is helmholtz equation
[d^2 /(dt)^2] (phi) + grad^2 (phi) = source I discretized the unsteady term (which is double derivative in time) using backward differencing and separated the terms into two terms as given in manual Following this I wrote a simple UDF as given below DEFINE_UDS_UNSTEADY(unsteady_function,c,t,i,apu,su ) { real vol; real delt; real time; real phi1; real phi2; vol = C_VOLUME(c,t); delt = CURRENT_TIMESTEP; time = CURRENT_TIME; if(i==0) { phi1 = C_STORAGE_R(c,t,SV_UDSI_M1(i)); /* value of phi at (n-1) time step */ if(time<5.0e-6) { phi2 = 0; } else { phi2 = C_STORAGE_R(c,t,SV_UDSI_M2(i)); /* value of phi at (n-2) time step */ } /* C_UDSI_M2(c,t,i);*/ *apu = (mu * epsilon * vol) / (delt * delt); *su = (-2 * phi1 + phi2 )*mu * epsilon * vol / (delt * delt); } } But when I run after hooking the UDF, till 5.0e-6 seconds the transient solutions converges. But when it has to access the (n-2) time step term then the there is an error "ACCESS VIOLATION" Can anyone help me to figure out if there is an error Error: FLUENT 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: () Can anyone help me to figure out if there is an error |
|
August 1, 2015, 10:58 |
resolved
|
#2 | |
New Member
Gylles
Join Date: Aug 2015
Posts: 1
Rep Power: 0 |
You should go: Solve --> Solution Methods --> Transient Formulation -->Second Order Implicit (on).
Good luck!! Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field | lakeat | OpenFOAM Community Contributions | 58 | December 23, 2021 03:36 |
-Xlinker --add-needed -Xlinker --no-as-needed | NH1994 | OpenFOAM Programming & Development | 7 | December 31, 2014 11:24 |
OpenFOAM static build on Cray XT5 | asaijo | OpenFOAM Installation | 9 | April 6, 2011 13:21 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 11:23 |
unsteady Bernoulli equation and wagner function. | Afungchui | Main CFD Forum | 0 | March 14, 2005 12:50 |