-
Thanks for your reply Anner. From our training course at the last FEFLOW conference I know you develop in Matlab. The Python API is definitely not a big deal. Please contact me in the FEFLOW Support and we will solve it together. I would be glad to hear from you.
-
The density ratio alpha is calculated by [b]alpha = (maximum density - minimum density) / minimum density[/b]. The maximum density refers to the density of the fluid with the maximum concentration [b]C[sub]S[/sub][/b] and the minimum density corresponds to the fluid density with the reference concentration [b]C[sub]0[/sub][/b]. This simple relationship is rather linear.
FEFLOW has different ways to consider density variations in the governing equations you are solving:
[list]
[li]Buoyancy gravity-related terms. All density-variations are neglected apart from the crucial buoyancy terms within the Darcy equation[/li]
[li]Buoyancy, gradient, and rate-of-change terms. Density variations are additionally considered in the balance terms[/li]
[li]Buoyancy, gradient, rate-of-change and fluid disperse terms[/li]
[/list]
More details are provided by the following White Papers:
White Paper I, Chapter 7
White Paper I, Chapter 17
White Paper II, Chapter 1
You may find the White Papers on the DHI website: https://www.mikepoweredbydhi.com/download/product-documentation
-
No worries. I guess I misunderstood you. Therefore, I would like to ask you a few questions:
Do you want to select nodes of the FE-mesh along a line?
Do you want to select edges of the FE-mesh along a line?
Do you want to select vertices of a Supermesh line?
Do you want to select a line of a Supermesh?
Thank you in advance.
-
Currently, the GUI does not enable you to derive the different components of the Darcy-vector. However, you can use the FEFLOW API by writing few lines in Python/C/C++.
Here is a small snippet, which illustrates one possible workflow. The script does the following:
[list]
[li]Load the FEFLOW Kernel as an external module. [/li]
[li]Create three Nodal Distributions to store three different components of the Darcy-vector (3D model is assumed)[/li]
[li]Make the three Nodal Distributions time-dependent[/li]
[li]Start the simulation an write the components to the distributions after each time-step[/li]
[/list]
[font=courier][color=blue]
import sys, os
sys.path.append('C:\\Program Files\\DHI\\2016\\FEFLOW 7.0\\bin64')
import ifm
# Assign scalar quantities of vector components to nodal distributions
def postTimeStep(doc):
for nNode in range(0,nNodes):
doc.setNodalRefDistrValue(rID_velX, nNode, doc.getResultsXVelocityValue(nNode))
doc.setNodalRefDistrValue(rID_velY, nNode, doc.getResultsYVelocityValue(nNode))
doc.setNodalRefDistrValue(rID_velZ, nNode, doc.getResultsZVelocityValue(nNode))
try:
#Get current working directory
dir=os.getcwd()
#Definition of files
FEM_FILE=dir+'\\exercise_fri20.fem'
FEM_FILE_OUT = dir + '\\exercise_fri20_OUT.fem'
DAC_FILE=dir+'\\exercise_fri20.dac'
print "Input: " + FEM_FILE
print "Output: " + DAC_FILE
#Load document
doc=ifm.loadDocument(FEM_FILE)
# Enable reference distribution recording
bEnable = 1 # disable = 0, enable = 1
# Create and enable distribution recording
doc.createNodalRefDistr("Velocity_X")
rID_velX = doc.getNodalRefDistrIdByName("Velocity_X")
doc.enableNodalRefDistrRecording(rID_velX,bEnable)
doc.createNodalRefDistr("Velocity_Y")
rID_velY = doc.getNodalRefDistrIdByName("Velocity_Y")
doc.enableNodalRefDistrRecording(rID_velY,bEnable)
doc.createNodalRefDistr("Velocity_Z")
rID_velZ = doc.getNodalRefDistrIdByName("Velocity_Z")
doc.enableNodalRefDistrRecording(rID_velZ,bEnable)
nNodes = doc.getNumberOfNodes()
# Start simulator
doc.startSimulator(DAC_FILE)
#Stop simulator
doc.stopSimulator()
except Exception as err:
print>>sys.stderr,'Error: '+str(err)+'!'
sys.exit(-1);
[/color][/font]
Please note that the script does not have been carefully tested.
If you want to load an existing dac-file instead of starting the simulation you can use the callback [font=courier][color=blue]doc.loadTimeStep() [/color][/font] instead of [font=courier][color=blue]postTimeStep()[/color][/font]. This callback is supported by the Python API only.
-
Great, thank you for your input axa.maqueda.
-
FEFLOW has the capability to automatically compute anisotropy angles based on the slope of each element. This method is listed as [b]General anisotropy with computed angles[/b] in the [b]Problem Settings[/b].
-
An update of the display should be automatically triggered as soon you went through a callback. If it does not work please let me know the name of the callback you are using. Thank you in advance.
-
ParaView and ArcGIS allow you to calculate the gradient.
Possible filters of interest in ParaView are called [b]Compute Derivatives[/b] and [b]Gradient Of Unstructured DataSet[/b] while the ArcToolBox function for ArcGIS is called [b]Slope 3D Analyst[/b]. I assume that QGIS has a similar function as ArcGIS, in case you want to use a GIS which is for free.
Please note that the current FEFLOW 7.0 version does not have a VTK/VTU writer for ParaView. In contrast, shapefiles for GIS can be easily exported from FEFLOW. All software products I mentioned have a Python API. Accordingly, the functions/filters of these external tools can be integrated within a single data processing pipeline with FEFLOW.
I never used Tecplot. Unfortunately, I cannot help you with Tecplot.
-
Yes, that's correct. Boundary Conditions (BC's) can be adjusted by IFM implemented parameters. Carlos already addressed this topic in a generalized manner: http://forum.mikepoweredbydhi.com/index.php?topic=2047.0. The material file with the extension *.fpi is the file which must contain the BC.
At the moment the implementation in C/C++ is easier than in Python. The reason is that compiled C/C++ code can be attached to the fem problem. In contrast, a Python script can not be attached to fem-files. Instead, you load the FEFLOW kernel as a module, while the Python script needs be called from the [b]run_model.dat[/b] file.
The next FEFLOW 7.1 release allows you to attach Python scripts to fem-files.
-
The PCE degradation can be imposed as user-defined reactions for multi-species models. The fme-file you are referring to is simply a file which contains the user defined reactions. The Reaction Kinetics Editor allows you to import and export fme-files. You may use these files to easily transfer the reactions from one model to another model.