Author |
Message |
Philip (riche)
Junior Member Username: riche
Post Number: 3 Registered: 06-2006
| Posted on Thursday, July 27, 2006 - 01:50 pm: | |
Hello Dr Nelson, Thank you for your previous help since longtimes I have a question now about MESH EXPORT. I would like to transfer the SAME MESH of a file PDE ( after working of first file ) into another application of this file ( when I change a parameter in defintion). In other word, I want to save the mesh. I have tried 2 exemples: TRANSFER_out.PDE and TRANSFER_IN.PDE in the package "Applications Manual". But I find that they don’t give the SAME MESH. Finaly, I want to do a ratio of results between 2 applications, for exemple: (Elevation of Temp of first application / Temps of second). What can I do in this case. Maybe another command ? Thank you, Mai { This example uses a modification of the sample problem HEATBDRY.PDE to illustrate the use of the TRANSFER output function. Temperatures calculated here are transferred as input to the stress calculation TRANSFER_IN.PDE } title "Coolant Pipe Heatflow" Variables Temp(range=0,1) definitions K = 1 source = 4 Tzero = 0 flux = -K*grad(Temp) equations div(K*grad(Temp)) + source = 0 boundaries Region 1 natural(Temp)=0 start "OUTER" (0,0) line to(1,0) natural(Temp)=0 arc (center=0,0) to (0,1) natural(Temp)=0 line to finish natural(Temp)=Tzero-Temp start "INNER" (0.4,0.2) arc (center=0.4,0.4) to (0.6,0.4) to (0.4,0.6) to (0.2,0.4) finish monitors contour(Temp) plots grid(x,y) contour(Temp) surface(Temp) vector(-K*dx(Temp),-K*dy(Temp)) as "Heat Flow" contour(source) elevation(normal(flux)) on "outer" range(-0.08,0.08) report(bintegral(normal(flux),"outer")) as "bintegral" elevation(normal(flux)) on "inner" range(1.95,2.3) report(bintegral(normal(flux),"inner")) as "bintegral" { HERE IS THE TRANSFER OUTPUT COMMAND: } transfer(Temp) file="transfer.dat" end 15317 { This problem demonstrates the use of the TRANSFER facility to import temperatures from TRANSFER_OUT.PDE as the source of thermal expansion driving a stress calculation. TRANSFER_OUT.PDE must be run before running this problem. } Title 'Testing the TRANSFER input function' select painted { paint all contour plots } variables U V definitions nu = 0.3 { define Poisson's Ratio } E = 21 { Young's Modulus x 10**-11 } G = E/(1-nu**2) C11 = G C12 = G*nu C22 = G C33 = G*(1-nu)/2 alpha = 1e-3 b = G*alpha*(1+nu) { HERE IS THE TRANSFER INPUT FUNCTION: } transfer('transfer.dat',Temp) Sxx = C11*dx(U) + C12*dy(V) - b*Temp Syy = C12*dx(U) + C22*dy(V) - b*temp Sxy = C33*(dy(U) + dx(V)) initial values U = 0 V = 0 equations dx[Sxx] + dy(Sxy) = 0 dy[Syy] + dx(Sxy) = 0 constraints integral(u) = 0 integral(v) = 0 integral(dx(v)-dy(u)) = 0 boundaries Region 1 start "OUTER" (0,0) natural(U)=0 value(V)=0 line to(1,0) natural(U)=0 natural(V)=0 { free outer boundary } arc (center=0,0) to (0,1) value(U)=0 natural(V)=0 line to finish natural(U)=0 natural(V)=0 { free inner boundary } start "INNER" (0.4,0.2) arc (center=0.4,0.4) to (0.6,0.4) to (0.4,0.6) to (0.2,0.4) finish monitors grid(x+100*U,y+100*V) plots contour(Temp) grid(x+100*U,y+100*V) vector(U,V) as "Displacement" contour(U) as "X-Displacement" contour(V) as "Y-Displacement" contour(Sxx) as "X-Stress" contour(Syy) as "Y-Stress" surface(Sxx) as "X-Stress" surface(Syy) as "Y-Stress" end 5535
|
Bouke Tuinstra (bouke)
Member Username: bouke
Post Number: 5 Registered: 04-2006
| Posted on Wednesday, August 23, 2006 - 03:54 am: | |
I'm not an expert (and somehow it seems the custom here that only dr. Nelson answers questions), but let me risk posting an answer nonetheless. If I understand you correctly, you want to calculate two cases (e.g., temperature fields with different values for K) on the same grid and then manipulate the results. Would it not be the easiest way if you define in a single script an equation for variable Temp1 with (e.g.) conductivity K1 and another for variable Temp2 with K2 and compute both cases simultaneously? |
Philip (riche)
Member Username: riche
Post Number: 10 Registered: 06-2006
| Posted on Wednesday, August 23, 2006 - 04:38 am: | |
This is exactly my idea. And you gave me a very good and efficient solution. Thank you so much, Mai |
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 675 Registered: 06-2003
| Posted on Wednesday, August 23, 2006 - 10:12 pm: | |
1. The TRANSFERMESH command imports a mesh from a previous run and imposes it as the initial mesh for the importing run. TRANSFER merely imports data. The examples you quote are demonstrations of DATA transfer, not mesh transfer. See instead the examples MESH_IN and MESH_OUT. Of course, the method Bouke suggested is good too. 2. It does seem to be the custom that only I answer questions. But this is a custom "more honored in the breach than in the observance". I am very happy to have others comment on questions posted to this board!
|
Philip (riche)
Member Username: riche
Post Number: 11 Registered: 06-2006
| Posted on Wednesday, August 30, 2006 - 07:03 am: | |
When I use the method Bouke, Can I use something like regrid(variable 2) = off ? In fact, I want to use the the same mesh for 2 system of variable. But I Want also use SIMPLY the FINAL mesh for second variable (second equation). In other word, I like to avoid the REFIMENT mesh for this equation but use the final mesh of first equation. Thank you |
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 677 Registered: 06-2003
| Posted on Wednesday, August 30, 2006 - 05:38 pm: | |
There's only one mesh in the solution. You can't turn off refinement for one variable and not another. It sounds like you would prefer the two-script method, with TRANSFERMESH to read the final phase-one grid into the phase-two problem. Then you can set REGRID=OFF in the second phase and just use the final phase-one mesh.
|
|