General

At this page you can post questions or start discussions on general topics related to Delft3D Flexible Mesh.

Please select a proper category below (if possible), to post your message or reply to an existing post. Please add tags to your posts to simplify searching.

 

** PLEASE TAG YOUR POST! **

 

 

 

 


Average (0Votes)

Comments

Chil Lee
Hi.

I am a student studying at Korea.

I have simulated using delft3D-FLOW.

Recently, I am trying to simulate a storm surge using Delft3d FM.

I have a simple question.

When I enter the Spider Web grid file on FM, can I use the .spw file using the dashboard?

Does delft3d-FLOW and FM use the same spider web grid file (spw)?

and How do I set the atmospheric pressure in FM?

Average air pressure on bounds/ average initial air pressure are 0 N/m^2 or 101325.00000 N/m^2 ??

Please answer a simple question.

I always thank you, guys.

Thank you.

Posted on 10/20/17 4:44 AM.

Top
« Back to 1. Simulation input, run, performance

Dflow-FM with python (errors!)

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Dflow-FM with python (errors!)
Answer (Unmark)
9/22/17 10:04 PM
Dear Community,

I've been following https://www.youtube.com/watch?v=m1il4xm2ZRQ (python scripting using D-Flow FM).
Everything works fine, but I have encountered a couple of errors that I can't fix.

1) It's setting up the initial condition and 'InterpolateSamplePoints' does not work.
1# Add sample points to initial water level
2
3from Libraries.SpatialOperations import *
4samplePoints = AddSamplePoints(fmModel, fmModel.InitialWaterLevel, measuredWaterLevels, subsetName = "subset water level measurements", sampleOperationName = "measurements 1-Jan-2012")
5InterpolateSamplePoints(samplePoints[0], samplePoints[1], interpName ="Interpolated water level measurements")


It's setting up the initial condition and 'InterpolateSamplePoints' does not work.

2) setting up time parameters does NOT work.I checked the variable 'timeStep' and verified they are correctly assigned values, but it seems 'SetModelProperty' is not properly setting up the parameters.

1# Model parameters
2# set model max and initial timestep size
3timeStep = timedelta(hours=1)
4
5SetModelProperty(fmModel, KnownProperties.DtMax, str(timeStep.total_seconds()))
6SetModelProperty(fmModel, KnownProperties.DtInit, str(timeStep.total_seconds()))


Any help would be appreciated.
thanks.
RE: Dflow-FM with python (errors!)
Answer (Unmark)
9/29/17 4:40 PMas a reply to Seungjin Baek.
Dear Seungjin

Concerning your first issue, spatial operations did not/do not work properly in the Delft3D FM 1.3.2. There were apparently some framework issues, hence via Python it could not be used either. Note there is a new Beta-release Delft3D FM 1.3.4 where Spatial Operations were fixed and should work properly.

In reference to the second issue you have reported, have you tried to switch off and on your active model? I mean to close the tab FlowFM, which you have likely opened in your main window, and then reopen it again by double clicking on the model name (in this case FlowFM). You should then go again to the Time Frame and see updated values. Please let me know if it worked for you.
Unfortunately, at this point DeltaShell does not refresh the view when values are changed via Python.

Kind regards,
Michal
RE: Dflow-FM with python (errors!)
Answer (Unmark)
10/1/17 8:58 AMas a reply to Michal Kleczek.
Much appreciated!
I will try and see if that works. Thanks again.

Michal Kleczek:
Dear Seungjin

Concerning your first issue, spatial operations did not/do not work properly in the Delft3D FM 1.3.2. There were apparently some framework issues, hence via Python it could not be used either. Note there is a new Beta-release Delft3D FM 1.3.4 where Spatial Operations were fixed and should work properly.

In reference to the second issue you have reported, have you tried to switch off and on your active model? I mean to close the tab FlowFM, which you have likely opened in your main window, and then reopen it again by double clicking on the model name (in this case FlowFM). You should then go again to the Time Frame and see updated values. Please let me know if it worked for you.
Unfortunately, at this point DeltaShell does not refresh the view when values are changed via Python.

Kind regards,
Michal