CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[General] How Can I draw zero level set of a function with paraview

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 2, 2017, 19:15
Default How Can I draw zero level set of a function with paraview
  #1
New Member
 
Ali
Join Date: Jul 2017
Posts: 2
Rep Power: 0
agerami is on a distinguished road
I have wrote an script in matlab (you can find it in below) that I need to know how can I export that to the paraview for drawing its zero level set. (based on my knowledge it would be a sphere).



clear
clc

N=4;
k=[0:N/2-1 0 -N/2+1:-1];
l=[0:N/2-1 0 -N/2+1:-1];
m=[0:N/2-1 0 -N/2+1:-1];

t=0;
dt=.01;
T=200;
eps=.01; % epsilon in the equation;
Meps=1/eps;
Mv=100;
Ma=100;
r0=1;

phi0=zeros(N,N,N);

tic;
for i=1:N
for j=1:N
for n=1:N
i
j
n

fun1 = @(x,y,z) [cos(pi*(k(i)*x+l(j)*y+m(n)*z))-1i*sin(pi*(k(i)*x+l(j)*y+m(n)*z))].*tanh((r0-sqrt(x.^2 +y.^2 +z.^2 ))/eps);
phi0(i,j,n)=integral3(fun1,-1,1,-1,1,-1,1);
end
end
end
toc;
agerami is offline   Reply With Quote

Reply

Tags
level set function, matlab, paraview

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
does Hyperthreading affect the application of UDF? SJSW Fluent UDF and Scheme Programming 11 October 10, 2018 22:28
Coupling level set with volume of fluid. Saideep Main CFD Forum 2 July 1, 2016 20:43
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 01:27
[blockMesh] error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Meshing & Mesh Conversion 2 March 14, 2012 09:56
latest OpenFOAM-1.6.x from git failed to compile phsieh2005 OpenFOAM Bugs 25 February 9, 2010 04:37


All times are GMT -4. The time now is 13:49.