Giter Site home page Giter Site logo

Comments (10)

krober10nd avatar krober10nd commented on June 28, 2024

Interesting application for offshore wind? I think this is happening because the vector inputs are by default smoothed via a moving window approach. You can deactivate this by passing "window",1 to your geodata class constructor.

from oceanmesh2d.

tc-ecoast avatar tc-ecoast commented on June 28, 2024

Thanks, and that's correct regarding the application.

Using the "window",1 input to geodata did not change the result in either approach unfortunately.

I forgot to mention before, but when I interpolate the DEM with the features included, after the mesh generation, it interpolates it to the correct locations.

Would any spatial modifications occur during the call to meshgen?

Thanks

from oceanmesh2d.

krober10nd avatar krober10nd commented on June 28, 2024

Could you post the vector inputs here so I can try at some point?

I wouldn't recommend using the feature size here. Instead use the distance mesh sizing function.

from oceanmesh2d.

tc-ecoast avatar tc-ecoast commented on June 28, 2024

I'll try the distance sizing instead. Here is a compressed folder that contains everything to run my setup:
https://www.dropbox.com/scl/fi/gvfuv45hdszfbxstyd2n4/upload.zip?rlkey=n7k69nya9wjcw8ogr0jgebkhq&dl=0

from oceanmesh2d.

krober10nd avatar krober10nd commented on June 28, 2024

Hi Tom, I'm taking a look at your example. Can you add the offshore wind foundations to the shoreline inputs you pass to geodata_3 instead of modifying the DEM?

If you are using OceanMesh2D V6, set the high_fidelity option in the geodata_3 constructor to 1 and use a distance sizing heuristic instead of the feature size, you will be able to preserve the structure of the turbine foundations.

I am still investigating why the DEM is shifting in the mesh sizing function.

from oceanmesh2d.

tc-ecoast avatar tc-ecoast commented on June 28, 2024

Thanks for looking into that. Including the feature locations to the shoreline input did allow for the features to be resolved at the correct locations which is great. We do want a mesh inside of the features as well though, but I'm looking into how to fill each mesh region after it is generated.

from oceanmesh2d.

krober10nd avatar krober10nd commented on June 28, 2024

You can then use the meshgen class with the edgefx and geodata classes that have the osw foundations to just generate the pfix and egfix. Then you pass this to your meshgen. Don't use the geodata class with the osw in the vector inputs to build the final mesh though.

Check out how I did it in this example for constraining the shoreline but meshing upwards to a higher iso contour on the floodplain.

clearvars; clc; close all
%%
PREFIX = 'hamburg_overland';

%% Set mesh extents and set parameters for mesh.
min_el = 100*10;            % Minimum mesh resolution in meters.

max_el = 1e3*10;

grade = 0.05; 

fs = 3 ;                % Place 3 vertices per width of shoreline feature.

max_el_ns = 500*10; 

%%
coastline = 'GSHHS_f_L1';
floodline = 'floodline_contour_polygon_v1';
my_bbox   = 'bbox_v1';

tmp = m_shaperead(my_bbox); 
bbox2 = tmp.ncst{1}; 

gdatuw = geodata(...
    'shp',coastline,...
    'bbox',bbox2,...
    'h0',min_el,...
    'high_fidelity',1); % KJR: Set this for the constraints to be generated.

fh = edgefx(...
    'geodata',gdatuw,...
    'fs',fs,...
    'max_el_ns',max_el_ns,...
    'g',grade,...
    'max_el',max_el);
%%
mshopts = meshgen('ef',fh,'bou',gdatuw,'plot_on',1);

pfix  = mshopts.pfix; 
egfix = mshopts.egfix; 

gdat = geodata(...
    'shp',floodline,...
    'bbox',bbox2,...
    'h0',min_el);

mshopts = meshgen('ef',fh,'bou',gdat,...
    'pfix',pfix,'egfix',egfix);

mshopts = mshopts.build();

m = mshopts.grd;

%% 

plot(m,'type','tri','proj','none'); 
drawedge2(pfix,egfix,'k');

from oceanmesh2d.

krober10nd avatar krober10nd commented on June 28, 2024

Have you been able to apply the above code to mesh the turbine foundations and preserve their locations?

from oceanmesh2d.

tc-ecoast avatar tc-ecoast commented on June 28, 2024

That approach also did not work. I can give more detailed feedback soon.

I went back to the altered DEM approach and found that the spatial shifting occurs only when pfix points are input to meshgen (either at the model boundary or at the structure locations). So we found a working solution by using the altered DEM without any pfix points, which generated high resolution in the correct areas.

from oceanmesh2d.

krober10nd avatar krober10nd commented on June 28, 2024

Thank you. I would l appreciate more details to resolve the original issue with the DEM shifting.

I also want to understand what went wrong with my last suggested approach using the high fidelity mode. Thanks again.

from oceanmesh2d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.